Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cceb869 commit f407061Copy full SHA for f407061
src/http/http.go
@@ -12,6 +12,7 @@ import (
12
"global"
13
"html/template"
14
"logic"
15
+ "math/rand"
16
"model"
17
"net/http"
18
"path/filepath"
@@ -109,6 +110,13 @@ var funcMap = template.FuncMap{
109
110
}
111
return total
112
},
113
+ "mod": func(num1, num2 int) int {
114
+ if num1 == 0 {
115
+ num1 = rand.Intn(500)
116
+ }
117
+
118
+ return num1 % num2
119
+ },
120
"explode": func(s, sep string) []string {
121
return strings.Split(s, sep)
122
static/img/activity/1024-0.jpg
86 KB
static/img/activity/1024-1.jpg
88.2 KB
0 commit comments