@@ -23,7 +23,7 @@ const asciiViam = `
23
23
24
24
// printf prints a message with no prefix.
25
25
func printf (w io.Writer , format string , a ... interface {}) {
26
- fmt .Fprintf (w , format + "\n " , a ... )
26
+ fmt .Fprintf (w , format + "\n " , a ... ) //nolint:errcheck
27
27
}
28
28
29
29
// debugf prints a message prefixed with a bold grey "Debug: ".
@@ -34,7 +34,7 @@ func debugf(w io.Writer, debugMode bool, format string, a ...interface{}) {
34
34
if _ , err := color .New (color .Bold , color .FgHiBlack ).Fprint (w , "Debug: " ); err != nil {
35
35
log .Fatal (err )
36
36
}
37
- fmt .Fprintf (w , format + "\n " , a ... )
37
+ fmt .Fprintf (w , format + "\n " , a ... ) //nolint:errcheck
38
38
}
39
39
40
40
// infof prints a message prefixed with a bold cyan "Info: ".
@@ -45,15 +45,15 @@ func infof(w io.Writer, format string, a ...interface{}) {
45
45
if _ , err := color .New (color .Bold , color .FgCyan ).Fprint (w , "Info: " ); err != nil {
46
46
log .Fatal (err )
47
47
}
48
- fmt .Fprintf (w , format + "\n " , a ... )
48
+ fmt .Fprintf (w , format + "\n " , a ... ) //nolint:errcheck
49
49
}
50
50
51
51
// warningf prints a message prefixed with a bold yellow "Warning: ".
52
52
func warningf (w io.Writer , format string , a ... interface {}) {
53
53
if _ , err := color .New (color .Bold , color .FgYellow ).Fprint (w , "Warning: " ); err != nil {
54
54
log .Fatal (err )
55
55
}
56
- fmt .Fprintf (w , format + "\n " , a ... )
56
+ fmt .Fprintf (w , format + "\n " , a ... ) //nolint:errcheck
57
57
}
58
58
59
59
// Errorf prints a message prefixed with a bold red "Error: " prefix and exits with 1.
@@ -69,7 +69,7 @@ func Errorf(w io.Writer, format string, a ...interface{}) {
69
69
log .Fatal ("Malformed error message:" , toPrint )
70
70
}
71
71
upperR := unicode .ToUpper (r )
72
- fmt .Fprintf (w , string (upperR )+ toPrint [i :])
72
+ fmt .Fprintf (w , string (upperR )+ toPrint [i :]) //nolint:errcheck,govet
73
73
74
74
os .Exit (1 )
75
75
}
0 commit comments