Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

Commit edb4246

Browse files
committed
Update buffer initialization to use builtin constructor
1 parent 24a8bc3 commit edb4246

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cmd/internal/kube/secret.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,9 @@ func handleSecretGeneration(namespace, key, secret, output string) (string, erro
8484
if err != nil {
8585
return "", cmderr.AkitaErr{Err: errors.Wrap(err, "failed to create output file")}
8686
}
87-
8887
defer secretFile.Close()
8988

90-
buf := new(bytes.Buffer)
89+
buf := bytes.NewBuffer([]byte{})
9190

9291
err = secretTemplate.Execute(buf, input)
9392
if err != nil {

0 commit comments

Comments
 (0)