mirror of
https://github.com/stakater/Reloader.git
synced 2026-08-20 12:36:26 +00:00
Implement golangci comments
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
||||
"k8s.io/client-go/tools/cache"
|
||||
"k8s.io/client-go/util/workqueue"
|
||||
)
|
||||
|
||||
// ResourceUpdated contains new or updated objects
|
||||
type ResourceUpdated struct {
|
||||
newObj interface{}
|
||||
@@ -126,7 +127,7 @@ func (c *Controller) takeAction(resourceUpdated ResourceUpdated) error {
|
||||
} else {
|
||||
logrus.Infof("Detected changes in object %s", newObj)
|
||||
// process events based on its type
|
||||
if(oldObj == nil){
|
||||
if oldObj == nil {
|
||||
logrus.Infof("Performing 'Added' action for controller of type '%s'", c.resource)
|
||||
} else {
|
||||
logrus.Infof("Performing 'Updated' action for controller of type '%s'", c.resource)
|
||||
|
||||
@@ -71,7 +71,10 @@ func TestControllerForUpdatingConfigmapShouldUpdateDeployment(t *testing.T) {
|
||||
}
|
||||
time.Sleep(10 * time.Second)
|
||||
logrus.Infof("Deleting Deployment %q.\n", deployment.GetObjectMeta().GetName())
|
||||
controller.client.Extensions().Deployments(namespace).Delete(configmapName, &metav1.DeleteOptions{})
|
||||
deploymentError := controller.client.Extensions().Deployments(namespace).Delete(configmapName, &metav1.DeleteOptions{})
|
||||
if deploymentError != nil {
|
||||
logrus.Infof("Error while deleting the configmap %v", deploymentError)
|
||||
}
|
||||
logrus.Infof("Deleting Configmap %q.\n", configmapName)
|
||||
error := controller.client.CoreV1().ConfigMaps(namespace).Delete(configmapName, &metav1.DeleteOptions{})
|
||||
if error != nil {
|
||||
|
||||
Reference in New Issue
Block a user