Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 committed Jun 7, 2024
1 parent ad24a65 commit 4822fd1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pkg/resource/check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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"},
Expand All @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion pkg/resource/in_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down
4 changes: 2 additions & 2 deletions pkg/resource/out.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4822fd1

Please sign in to comment.