mirror of
https://github.com/astaxie/beego.git
synced 2025-07-15 04:41:01 +00:00
add some useful func
This commit is contained in:
14
utils/caller_test.go
Normal file
14
utils/caller_test.go
Normal file
@ -0,0 +1,14 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestGetFuncName(t *testing.T) {
|
||||
name := GetFuncName(TestGetFuncName)
|
||||
t.Log(name)
|
||||
if !strings.HasSuffix(name, ".TestGetFuncName") {
|
||||
t.Error("get func name error")
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user