1
0
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:
astaxie
2013-12-12 22:25:08 +08:00
parent d603a6714d
commit 19119e99f7
7 changed files with 555 additions and 591 deletions

15
utils/slice_test.go Normal file
View 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")
}
}