golangci-lint: minimal changes to make make lint pass again

This commit is contained in:
Christian Schwarz
2026-01-20 22:01:44 +00:00
parent b4b16f7bca
commit 899e23762a
9 changed files with 12 additions and 9 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ func TestInvalidSampleConfigsFailToParse(t *testing.T) {
// template must be a template/text template with a single '{{ . }}' as placeholder for val
//
//nolint:deadcode,unused
//nolint:unused
func testValidConfigTemplate(t *testing.T, tmpl string, val string) *Config {
tmp, err := template.New("master").Parse(tmpl)
if err != nil {
@@ -13,7 +13,7 @@ func init() {
}
}
//nolint:deadcode,unused
//nolint:unused
func debug(format string, args ...interface{}) {
if debugEnabled {
fmt.Fprintf(os.Stderr, "repl: driver: %s\n", fmt.Sprintf(format, args...))
@@ -22,7 +22,7 @@ func debug(format string, args ...interface{}) {
type debugFunc func(format string, args ...interface{})
//nolint:deadcode,unused
//nolint:unused
func debugPrefix(prefixFormat string, prefixFormatArgs ...interface{}) debugFunc {
prefix := fmt.Sprintf(prefixFormat, prefixFormatArgs...)
return func(format string, args ...interface{}) {
+1 -1
View File
@@ -14,7 +14,7 @@ func init() {
}
}
//nolint:deadcode,unused
//nolint:unused
func debug(format string, args ...interface{}) {
if debugEnabled {
fmt.Fprintf(os.Stderr, "rpc/dataconn: %s\n", fmt.Sprintf(format, args...))
@@ -13,7 +13,7 @@ func init() {
}
}
//nolint:deadcode,unused
//nolint:unused
func debug(format string, args ...interface{}) {
if debugEnabled {
fmt.Fprintf(os.Stderr, "rpc/dataconn/heartbeatconn: %s\n", fmt.Sprintf(format, args...))
+1 -1
View File
@@ -29,7 +29,7 @@ func WithLogger(ctx context.Context, log Logger) context.Context {
return context.WithValue(ctx, contextKeyLogger, log)
}
//nolint:deadcode,unused
//nolint:unused
func getLog(ctx context.Context) Logger {
log, ok := ctx.Value(contextKeyLogger).(Logger)
if !ok {
+1 -1
View File
@@ -13,7 +13,7 @@ func init() {
}
}
//nolint:deadcode,unused
//nolint:unused
func debug(format string, args ...interface{}) {
if debugEnabled {
fmt.Fprintf(os.Stderr, "rpc/dataconn/stream: %s\n", fmt.Sprintf(format, args...))
+1 -1
View File
@@ -14,7 +14,7 @@ func init() {
}
}
//nolint:deadcode,unused
//nolint:unused
func debug(format string, args ...interface{}) {
if debugEnabled {
fmt.Fprintf(os.Stderr, "rpc: %s\n", fmt.Sprintf(format, args...))
+1 -1
View File
@@ -13,7 +13,7 @@ func init() {
}
}
//nolint:deadcode,unused
//nolint:unused
func debug(format string, args ...interface{}) {
if debugEnabled {
fmt.Fprintf(os.Stderr, "zfs: %s\n", fmt.Sprintf(format, args...))