Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: odubajDT <[email protected]>
  • Loading branch information
mowies and odubajDT authored Feb 5, 2025
1 parent 2f910f1 commit fa3c96a
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions githubgen/codeowners.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,17 +241,9 @@ func getGithubMembers(skipGithub bool, githubOrg string) (map[string]struct{}, e
}

func getFile(fileName string) ([]byte, error) {
fileContents, err := os.ReadFile(fileName) // nolint: gosec
if err != nil {
return nil, err
}
return fileContents, nil
return os.ReadFile(fileName) // nolint: gosec

Check warning on line 244 in githubgen/codeowners.go

View check run for this annotation

Codecov / codecov/patch

githubgen/codeowners.go#L243-L244

Added lines #L243 - L244 were not covered by tests
}

func setFile(fileName string, data []byte) error {
err := os.WriteFile(fileName, data, 0o600) // nolint: gosec
if err != nil {
return err
}
return nil
return os.WriteFile(fileName, data, 0o600) // nolint: gosec

Check warning on line 248 in githubgen/codeowners.go

View check run for this annotation

Codecov / codecov/patch

githubgen/codeowners.go#L247-L248

Added lines #L247 - L248 were not covered by tests
}

0 comments on commit fa3c96a

Please sign in to comment.