Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] lint fix in cmd/checkapi #31723

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions cmd/checkapi/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ func run(folder string, allowlistFilePath string) error {
}
allowlist := strings.Split(string(allowlistData), "\n")
var errs []error
err = filepath.Walk(folder, func(path string, info fs.FileInfo, err error) error {
err = filepath.Walk(folder, func(path string, info fs.FileInfo, _ error) error {
if info.Name() == "go.mod" {
base := filepath.Dir(path)
relativeBase, err := filepath.Rel(folder, base)
var relativeBase string
relativeBase, err = filepath.Rel(folder, base)
if err != nil {
return err
}
Expand All @@ -67,7 +68,7 @@ func run(folder string, allowlistFilePath string) error {
return nil
}
}
if err := walkFolder(base, componentType); err != nil {
if err = walkFolder(base, componentType); err != nil {
errs = append(errs, err)
}
}
Expand Down
Loading