Quiz module: Earn points for solved questions.

This commit is contained in:
Andreas Neue 2016-03-20 23:01:04 +01:00
parent cc4050e87e
commit 41164153c8
5 changed files with 72 additions and 32 deletions

View file

@ -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)