-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
package GoMybatis | ||
|
||
import ( | ||
"fmt" | ||
"log" | ||
"testing" | ||
) | ||
|
||
func TestLogStandard_Println(t *testing.T) { | ||
var stand = LogStandard{} | ||
//没有设置func,使用系统log打印 | ||
stand.Println([]byte("hello")) | ||
stand.Println("hello") | ||
|
||
//设置func,使用func打印 | ||
stand.PrintlnFunc = func(v []byte) { | ||
log.Println(string(v), "println on PrintlnFunc()") | ||
stand.PrintlnFunc = func(v ...string) { | ||
log.Println(fmt.Sprint(v)) | ||
} | ||
|
||
stand.Println([]byte("hello")) | ||
stand.Println("hello") | ||
} |