fix: lint issues
- Fix QF1016 in helmexec/exec.go: use fmt.Fprintf instead of Write([]byte(fmt.Sprintf()))
- Remove unused allReleases parameter from collectDirectNeeds
Signed-off-by: yxxhero <aiopsclub@163.com>
(cherry picked from commit 4a6996c014)
Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
parent
28753f9bde
commit
b0827faf54
|
|
@ -256,7 +256,7 @@ func (helm *execer) AddRepo(name, repository, cafile, certfile, keyfile, usernam
|
|||
if username != "" && password != "" {
|
||||
args = append(args, "--username", username, "--password-stdin")
|
||||
buffer := bytes.Buffer{}
|
||||
buffer.Write([]byte(fmt.Sprintf("%s\n", password)))
|
||||
fmt.Fprintf(&buffer, "%s\n", password)
|
||||
out, err = helm.execStdIn(args, map[string]string{}, &buffer)
|
||||
} else {
|
||||
out, err = helm.exec(args, map[string]string{}, nil)
|
||||
|
|
|
|||
|
|
@ -3056,7 +3056,7 @@ func unmarkDirectNeeds(filteredReleases []Release, allReleases []ReleaseSpec) {
|
|||
unmarkReleases(directNeeds, filteredReleases)
|
||||
}
|
||||
|
||||
func collectDirectNeeds(filteredReleases []Release, allReleases []ReleaseSpec) map[string]struct{} {
|
||||
func collectDirectNeeds(filteredReleases []Release, _ []ReleaseSpec) map[string]struct{} {
|
||||
directNeeds := map[string]struct{}{}
|
||||
for _, r := range filteredReleases {
|
||||
if !r.Filtered {
|
||||
|
|
|
|||
Loading…
Reference in New Issue