forked from an/flokati
Quiz module: Earn points for solved questions.
This commit is contained in:
parent
cc4050e87e
commit
41164153c8
5 changed files with 72 additions and 32 deletions
|
@ -4,10 +4,8 @@ package util
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"math/rand"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
func ToInt(v interface{}) int {
|
||||
|
@ -49,11 +47,6 @@ func NumberToString(n int, sep rune) string {
|
|||
return buf.String()
|
||||
}
|
||||
|
||||
func Random(min, max int) int {
|
||||
rand.Seed(time.Now().Unix())
|
||||
return rand.Intn(max-min) + min
|
||||
}
|
||||
|
||||
func ReplaceUmlauts(s string) string {
|
||||
ret := strings.Replace(s, "Ä", "Ae", -1)
|
||||
ret = strings.Replace(ret, "Ö", "Oe", -1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue