diff --git a/pkg/resource/check_test.go b/pkg/resource/check_test.go index cb56290..0c2b612 100644 --- a/pkg/resource/check_test.go +++ b/pkg/resource/check_test.go @@ -41,7 +41,7 @@ func TestCheckResource(t *testing.T) { } defer testServer.Close() - //No version given + // No version given versions, err := Check(ctx, CheckRequest{Resource: source}) if err != nil { t.Fatal("check failed: ", err) @@ -52,7 +52,7 @@ func TestCheckResource(t *testing.T) { t.Fatalf("Expected %v, got %v", expected, versions) } - //version given + // version given versions, err = Check(ctx, CheckRequest{ Resource: source, Version: Version{Path: "test_0.3.0"}, @@ -69,7 +69,7 @@ func TestCheckResource(t *testing.T) { t.Fatalf("Expected %v, got %v", expected, versions) } - //No new version + // No new version versions, err = Check(ctx, CheckRequest{ Resource: source, Version: Version{Path: "test_1.2.3"}, diff --git a/pkg/resource/in_test.go b/pkg/resource/in_test.go index dda2a42..8e61c51 100644 --- a/pkg/resource/in_test.go +++ b/pkg/resource/in_test.go @@ -56,7 +56,7 @@ func TestIn(t *testing.T) { {Name: "Last Modified", Value: ""}, }, } - //Clear out the Last modified metadata from response + // Clear out the Last modified metadata from response for i, m := range response.Metadata { if m.Name == "Last Modified" { response.Metadata[i].Value = "" diff --git a/pkg/resource/out.go b/pkg/resource/out.go index 7f5b09b..cdedaae 100644 --- a/pkg/resource/out.go +++ b/pkg/resource/out.go @@ -125,8 +125,8 @@ func prepareFileSource(request OutRequest, sourceDir string) (string, error) { return "", fmt.Errorf("invalid regex in from: %w", err) } - //if the from param contains a literal prefix containing slashes - //we move the search base to the deepest sub directory + // if the from param contains a literal prefix containing slashes + // we move the search base to the deepest sub directory prefix, _ := from.LiteralPrefix() dir := regexp.MustCompile("^.*/").FindString(prefix) searchBase := filepath.Join(sourceDir, dir)