This is an automated email from the ASF dual-hosted git repository. astefanutti pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit b51a722fa10ba13b8227bb0b226fbb4de1fc7b0f Author: Antonin Stefanutti <anto...@stefanutti.fr> AuthorDate: Wed Sep 28 15:31:47 2022 +0200 chore: Fix lint errors --- pkg/trait/gc.go | 3 --- pkg/trait/util.go | 18 +++--------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/pkg/trait/gc.go b/pkg/trait/gc.go index 723a51437..2ec07f384 100644 --- a/pkg/trait/gc.go +++ b/pkg/trait/gc.go @@ -19,7 +19,6 @@ package trait import ( "context" - "regexp" "strconv" "strings" "sync" @@ -46,8 +45,6 @@ import ( ) var ( - toFileName = regexp.MustCompile(`[^(\w/\.)]`) - lock sync.Mutex rateLimiter = rate.NewLimiter(rate.Every(time.Minute), 1) collectableGVKs = make(map[schema.GroupVersionKind]struct{}) diff --git a/pkg/trait/util.go b/pkg/trait/util.go index 69d9c3db2..478604cce 100644 --- a/pkg/trait/util.go +++ b/pkg/trait/util.go @@ -26,10 +26,11 @@ import ( "sort" "strings" - user "github.com/mitchellh/go-homedir" "github.com/pkg/errors" "github.com/scylladb/go-set/strset" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + ctrl "sigs.k8s.io/controller-runtime/pkg/client" v1 "github.com/apache/camel-k/pkg/apis/camel/v1" @@ -113,7 +114,7 @@ func collectConfigurations(configurationType string, configurable ...v1.Configur continue } - //nolint: staticcheck,nolintlint + // nolint: staticcheck,nolintlint for _, entry := range entries { if entry.Type == configurationType { item := make(map[string]string) @@ -198,19 +199,6 @@ func filterTransferableAnnotations(annotations map[string]string) map[string]str return res } -func mustHomeDir() string { - dir, err := user.Dir() - if err != nil { - panic(err) - } - return dir -} - -func toHostDir(host string) string { - h := strings.Replace(strings.Replace(host, "https://", "", 1), "http://", "", 1) - return toFileName.ReplaceAllString(h, "_") -} - // ExtractSourceDependencies extracts dependencies from source. func ExtractSourceDependencies(source v1.SourceSpec, catalog *camel.RuntimeCatalog) (*strset.Set, error) { dependencies := strset.New()