fix golint issues

This commit is contained in:
kevin
2020-10-16 11:13:55 +08:00
parent 94645481b1
commit fe3739b7f3
9 changed files with 41 additions and 49 deletions

View File

@@ -229,8 +229,10 @@ func TestSetup(t *testing.T) {
func TestDisable(t *testing.T) {
Disable()
WithKeepDays(1)
WithGzip()
var opt logOptions
WithKeepDays(1)(&opt)
WithGzip()(&opt)
assert.Nil(t, Close())
writeConsole = false
assert.Nil(t, Close())

View File

@@ -15,7 +15,7 @@ const testlog = "Stay hungry, stay foolish."
func TestCollectSysLog(t *testing.T) {
CollectSysLog()
content := getContent(captureOutput(func() {
log.Printf(testlog)
log.Print(testlog)
}))
assert.True(t, strings.Contains(content, testlog))
}