Skip to content

Commit

Permalink
Merge pull request #2934 from nirs/lint
Browse files Browse the repository at this point in the history
Update golangci-lint to 1.62.0
  • Loading branch information
jandubois authored Nov 22, 2024
2 parents af4e870 + 3516cc4 commit e5a4ddd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Run golangci-lint
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
version: v1.60.1
version: v1.62.0
args: --verbose --timeout=10m
- name: Run yamllint
run: yamllint .
Expand Down
8 changes: 4 additions & 4 deletions cmd/limactl/gendoc.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ weight: 3
})
}

// replaceAll replaces all occurrences of new with old, for all files in dir.
func replaceAll(dir, old, new string) error {
logrus.Infof("Replacing %q with %q", old, new)
// replaceAll replaces all occurrences of text with replacement, for all files in dir.
func replaceAll(dir, text, replacement string) error {
logrus.Infof("Replacing %q with %q", text, replacement)
return filepath.Walk(dir, func(path string, info fs.FileInfo, err error) error {
if err != nil {
return err
Expand All @@ -133,7 +133,7 @@ func replaceAll(dir, old, new string) error {
if err != nil {
return err
}
out := bytes.ReplaceAll(in, []byte(old), []byte(new))
out := bytes.ReplaceAll(in, []byte(text), []byte(replacement))
err = os.WriteFile(path, out, 0o644)
if err != nil {
return err
Expand Down

0 comments on commit e5a4ddd

Please sign in to comment.