mirror of
https://github.com/astaxie/beego.git
synced 2025-07-10 02:40:17 +00:00
move utils to utils libs & func move to templatefunc
This commit is contained in:
15
utils/slice_test.go
Normal file
15
utils/slice_test.go
Normal file
@ -0,0 +1,15 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestInSlice(t *testing.T) {
|
||||
sl := []string{"A", "b"}
|
||||
if !InSlice("A", sl) {
|
||||
t.Error("should be true")
|
||||
}
|
||||
if InSlice("B", sl) {
|
||||
t.Error("should be false")
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user