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

10
utils/slice.go Normal file
View File

@@ -0,0 +1,10 @@
package utils
func InSlice(v string, sl []string) bool {
for _, vv := range sl {
if vv == v {
return true
}
}
return false
}