diff --git a/pkg/backends/knative.go b/pkg/backends/knative.go index 566352c4..2893eeb3 100644 --- a/pkg/backends/knative.go +++ b/pkg/backends/knative.go @@ -21,7 +21,6 @@ import ( "fmt" "log" "net/http" - "os" "strconv" "github.com/grycap/oscar/v3/pkg/imagepuller" @@ -33,8 +32,8 @@ import ( knclientset "knative.dev/serving/pkg/client/clientset/versioned" ) -// Custom logger -var knativeLogger = log.New(os.Stdout, "[KNATIVE] ", log.Flags()) +// Custom logger - uncomment if needed +// var knativeLogger = log.New(os.Stdout, "[KNATIVE] ", log.Flags()) // KnativeBackend struct to represent a Knative client type KnativeBackend struct { diff --git a/pkg/handlers/job.go b/pkg/handlers/job.go index e0319d63..758feae5 100644 --- a/pkg/handlers/job.go +++ b/pkg/handlers/job.go @@ -157,7 +157,7 @@ func MakeJobHandler(cfg *types.Config, kubeClientset kubernetes.Interface, back c.Next() // Initialize event envVar and args var - event := v1.EnvVar{} + var event v1.EnvVar var args []string if cfg.InterLinkAvailable && service.InterLinkNodeName != "" { diff --git a/pkg/utils/auth/auth.go b/pkg/utils/auth/auth.go index 57795a48..0df154e3 100644 --- a/pkg/utils/auth/auth.go +++ b/pkg/utils/auth/auth.go @@ -110,11 +110,11 @@ func GetLoggerMiddleware() gin.HandlerFunc { func GetUIDFromContext(c *gin.Context) (string, error) { uidOrigin, uidExists := c.Get("uidOrigin") if !uidExists { - return "", fmt.Errorf("Missing EGI user uid") + return "", fmt.Errorf("missing EGI user uid") } uid, uidParsed := uidOrigin.(string) if !uidParsed { - return "", fmt.Errorf("Error parsing uid origin: %v", uidParsed) + return "", fmt.Errorf("error parsing uid origin: %v", uidParsed) } return uid, nil } @@ -122,11 +122,11 @@ func GetUIDFromContext(c *gin.Context) (string, error) { func GetMultitenancyConfigFromContext(c *gin.Context) (*MultitenancyConfig, error) { mcUntyped, mcExists := c.Get("multitenancyConfig") if !mcExists { - return nil, fmt.Errorf("Missing multitenancy config") + return nil, fmt.Errorf("missing multitenancy config") } mc, mcParsed := mcUntyped.(*MultitenancyConfig) if !mcParsed { - return nil, fmt.Errorf("Error parsing multitenancy config") + return nil, fmt.Errorf("error parsing multitenancy config") } return mc, nil } diff --git a/pkg/utils/minio.go b/pkg/utils/minio.go index 22d2a6c2..2ad3061e 100644 --- a/pkg/utils/minio.go +++ b/pkg/utils/minio.go @@ -21,10 +21,8 @@ import ( "crypto/tls" "encoding/json" "fmt" - "log" "net/http" "net/url" - "os" "time" "github.com/grycap/oscar/v3/pkg/types" @@ -33,7 +31,8 @@ import ( const ALL_USERS_GROUP = "all_users_group" -var minioLogger = log.New(os.Stdout, "[MINIO] ", log.Flags()) +// Custom logger - uncomment if needed +// var minioLogger = log.New(os.Stdout, "[MINIO] ", log.Flags()) // MinIOAdminClient struct to represent a MinIO Admin client to configure webhook notifications type MinIOAdminClient struct {