Skip to content

Commit 4d46952

Browse files
committed
fix lint.
1 parent 1747433 commit 4d46952

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

check-dns/lib/check_dns_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ import (
1313
func TestNameServer(t *testing.T) {
1414
nameserver, err := adapterAddress()
1515
if err != nil {
16-
t.Errorf(err.Error())
16+
t.Error(err)
1717
}
18-
t.Logf(nameserver)
18+
t.Log(nameserver)
1919
address := net.ParseIP(nameserver)
2020
if address == nil {
21-
t.Errorf("nameserver is invalid IP")
21+
t.Error("nameserver is invalid IP")
2222
}
2323
}
2424

check-log/lib/check-log.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ func (opts *logOpts) searchLog(ctx context.Context, logFile string) (int64, int6
290290
if opts.Encoding != "" {
291291
e := encoding.GetEncoding(opts.Encoding)
292292
if e == nil {
293-
return 0, 0, "", fmt.Errorf("unknown encoding:" + opts.Encoding)
293+
return 0, 0, "", fmt.Errorf("unknown encoding: %s", opts.Encoding)
294294
}
295295
opts.decoder = e.NewDecoder()
296296
}
@@ -447,7 +447,7 @@ func parseFilePattern(directory, filePattern string, caseInsensitive bool) ([]st
447447

448448
fileInfos, err := os.ReadDir(dirStr)
449449
if err != nil {
450-
return nil, fmt.Errorf("cannot read the directory:" + err.Error())
450+
return nil, fmt.Errorf("cannot read the directory: %s", err.Error())
451451
}
452452

453453
var fileList []string

check-smtp/lib/check-smtp_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (m *mockSMTPServer) runServe() error {
3939
tc := textproto.NewConn(conn)
4040

4141
for _, res := range m.responses {
42-
if err := tc.PrintfLine(res); err != nil {
42+
if err := tc.PrintfLine(res); err != nil { // nolint
4343
errCh <- err
4444
return
4545
}

0 commit comments

Comments
 (0)