From f32e2155932ed70889b4b9a6aade94509f42a010 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 May 2023 20:48:25 +0000 Subject: [PATCH 1/2] Bump github.com/docker/distribution Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.8.1+incompatible to 2.8.2+incompatible. - [Release notes](https://github.com/docker/distribution/releases) - [Commits](https://github.com/docker/distribution/compare/v2.8.1...v2.8.2) --- updated-dependencies: - dependency-name: github.com/docker/distribution dependency-type: indirect ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 44dd4d61..b0d84a9c 100644 --- a/go.mod +++ b/go.mod @@ -44,7 +44,7 @@ require ( github.com/cyphar/filepath-securejoin v0.2.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/cli v20.10.21+incompatible // indirect - github.com/docker/distribution v2.8.1+incompatible // indirect + github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/docker v20.10.21+incompatible // indirect github.com/docker/docker-credential-helpers v0.7.0 // indirect github.com/docker/go-connections v0.4.0 // indirect diff --git a/go.sum b/go.sum index 93dbdcd4..2fc7ea0d 100644 --- a/go.sum +++ b/go.sum @@ -181,8 +181,8 @@ github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 h1:aB github.com/docker/cli v20.10.21+incompatible h1:qVkgyYUnOLQ98LtXBrwd/duVqPT2X4SHndOuGsfwyhU= github.com/docker/cli v20.10.21+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= -github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v1.4.2-0.20190916154449-92cc603036dd/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.21+incompatible h1:UTLdBmHk3bEY+w8qeO5KttOhy6OmXWsl/FEet9Uswog= From de9297e27757ddc3395d2cfe06aaf7cee8bcb649 Mon Sep 17 00:00:00 2001 From: Antonette Caldwell Date: Mon, 22 May 2023 19:48:19 +0000 Subject: [PATCH 2/2] commented out gochecknoinits Signed-off-by: Antonette Caldwell --- .golangci.yml | 2 +- build/config.go | 2 +- internal/config/config.go | 2 +- linkerd/addons.go | 2 +- linkerd/oam.go | 2 +- main.go | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 4e607408..f4a37c57 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -181,7 +181,7 @@ linters: # - forbidigo # forbids identifiers # - funlen # tool for detection of long functions # - gochecknoglobals # checks that no global variables exist - - gochecknoinits # checks that no init functions are present in Go code + # - gochecknoinits # checks that no init functions are present in Go code # - gocognit # computes and checks the cognitive complexity of functions - goconst # finds repeated strings that could be replaced by a constant - gocritic # provides diagnostics that check for bugs, performance and style issues diff --git a/build/config.go b/build/config.go index fe783630..0b242d04 100644 --- a/build/config.go +++ b/build/config.go @@ -26,7 +26,7 @@ const Component = "Linkerd" var Meshmodelmetadata = make(map[string]interface{}) -var MeshModelConfig = adapter.MeshModelConfig{ //Move to build/config.go +var MeshModelConfig = adapter.MeshModelConfig{ // Move to build/config.go Category: "Cloud Native Network", Metadata: Meshmodelmetadata, } diff --git a/internal/config/config.go b/internal/config/config.go index e2dd0c12..e63e849f 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -157,7 +157,7 @@ func threadSafeAppend(fs *map[string]string, name string, url string, m *sync.RW } // GetFileNames takes the url of a github repo and the path to a directory. Then returns all the filenames->URL from that directory -func GetFileNames(owner string, repo string, path string) (map[string]string, error) { +func GetFileNames(owner, repo, path string) (map[string]string, error) { g := walker.NewGithub() var filenames = make(map[string]string) var m sync.RWMutex diff --git a/linkerd/addons.go b/linkerd/addons.go index ec888641..a498e427 100644 --- a/linkerd/addons.go +++ b/linkerd/addons.go @@ -14,7 +14,7 @@ import ( ) // installAddon installs/uninstalls an addon in the given namespace -func (linkerd *Linkerd) installAddon(namespace string, del bool, service string, patches []string, helmChartURL string, addon string, kubeconfigs []string) (string, error) { +func (linkerd *Linkerd) installAddon(namespace string, del bool, service string, patches []string, helmChartURL, addon string, kubeconfigs []string) (string, error) { act := mesherykube.INSTALL st := status.Installing diff --git a/linkerd/oam.go b/linkerd/oam.go index 4ed8b545..72f97154 100644 --- a/linkerd/oam.go +++ b/linkerd/oam.go @@ -1,9 +1,9 @@ package linkerd import ( + "errors" "fmt" "strings" - "errors" "github.com/google/uuid" "github.com/layer5io/meshery-adapter-library/common" diff --git a/main.go b/main.go index b8c1a322..f35e8304 100644 --- a/main.go +++ b/main.go @@ -95,7 +95,7 @@ func main() { os.Exit(1) } - // // Initialize Tracing instance + // Initialize Tracing instance // tracer, err := tracing.New(service.Name, service.TraceURL) // if err != nil { // log.Err("Tracing Init Failed", err.Error()) @@ -191,7 +191,7 @@ func registerWorkloads(port string, log logger.Handler) { return } - //If a URL is passed from env variable, it will be used for component generation with default method being "using manifests" + // If a URL is passed from env variable, it will be used for component generation with default method being "using manifests" // In case a helm chart URL is passed, COMP_GEN_METHOD env variable should be set to Helm otherwise the component generation fails if os.Getenv("COMP_GEN_URL") != "" && (os.Getenv("COMP_GEN_METHOD") == "Helm" || os.Getenv("COMP_GEN_METHOD") == "Manifest") { url = os.Getenv("COMP_GEN_URL")