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

Fix two errors reported by golangci-lint #23

Merged
merged 1 commit into from
May 10, 2024

Conversation

yuanchen8911
Copy link
Collaborator

This PR fixes the following two errors reported by golang-lint.

$ golangci-lint run ./...
WARN [lintersdb] The linter named "megacheck" is deprecated. It has been split into: gosimple, staticcheck, unused.
pkg/utils/k8s_config_test.go:113:15: Error return value of `os.Unsetenv` is not checked (errcheck)
			os.Unsetenv("KUBECONFIG")
			           ^
pkg/utils/k8s_config_test.go:117:20: Error return value of `os.Remove` is not checked (errcheck)
				defer os.Remove(f.Name())
				               ^
pkg/utils/k8s_config_test.go:130:20: Error return value of `os.Remove` is not checked (errcheck)
				defer os.Remove(f.Name())
				               ^
pkg/config/config.go:58:15: G304: Potential file inclusion via variable (gosec)
	data, err := os.ReadFile(path)
	             ^

Signed-off-by: Yuan Chen <[email protected]>
Copy link
Collaborator

@shinae-woo shinae-woo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@yuanchen8911 yuanchen8911 merged commit d023c44 into NVIDIA:main May 10, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants