Skip to content

Commit 9c4ba05

Browse files
committed
fix more lint issue
Signed-off-by: yxxhero <aiopsclub@163.com>
1 parent 56ae907 commit 9c4ba05

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

diff/diff.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ func printDiffRecords(suppressedKinds []string, kind string, context int, diffs
332332
for _, ckind := range suppressedKinds {
333333
if ckind == kind {
334334
str := fmt.Sprintf("+ Changes suppressed on sensitive content of type %s\n", kind)
335-
fmt.Fprint(to, ansi.Color(str, "yellow"))
335+
_, _ = fmt.Fprint(to, ansi.Color(str, "yellow"))
336336
return
337337
}
338338
}
@@ -343,7 +343,7 @@ func printDiffRecords(suppressedKinds []string, kind string, context int, diffs
343343
for i, diff := range diffs {
344344
if distances[i] > context {
345345
if !omitting {
346-
fmt.Fprintln(to, "...")
346+
_, _ = fmt.Fprintln(to, "...")
347347
omitting = true
348348
}
349349
} else {
@@ -368,7 +368,7 @@ func printDiffRecord(diff difflib.DiffRecord, to io.Writer) {
368368
_, _ = fmt.Fprintf(to, "%s\n", ansi.Color("- "+text, "red"))
369369
case difflib.Common:
370370
if text == "" {
371-
fmt.Fprintln(to)
371+
_, _ = fmt.Fprintln(to)
372372
} else {
373373
_, _ = fmt.Fprintf(to, "%s\n", " "+text)
374374
}

main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func runFakeHelm() int {
7676
var stub *fakeHelmSubcmd
7777

7878
if len(os.Args) < 2 {
79-
fmt.Fprintln(os.Stderr, "fake helm does not support invocations without subcommands")
79+
_, _ = fmt.Fprintln(os.Stderr, "fake helm does not support invocations without subcommands")
8080
return 1
8181
}
8282

0 commit comments

Comments
 (0)