-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
52 lines (43 loc) · 1.07 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Yup, just things I wanted. For fun, mostly
usage:
```
import e "github.com/ChrisKaufmann/goutils"
func main() {
print("e.Evenodd(1):"+e.Evenodd(1)+"\n")
print("e.Evenodd(0):"+e.Evenodd(0)+"\n")
print("e.Tostr(32):"+e.Tostr(32)+"\n")
print("e.Tostr(false):"+e.Tostr(false)+"\n")
print("e.Tostr(true):"+e.Tostr(true)+"\n")
print("e.Toint(\"0\"):"+e.Tostr(e.Toint("0"))+"\n")
print("\n")
print("arr := []int{1,2,3,4,5}\n")
arr := []int{1,2,3,4,5}
print("e.Shuffle(&arr):")
e.Shuffle(&arr)
for _,i := range arr {
print(i)
print(",")
}
print("\n")
print("\n")
print("ars := []string{\"a\",\"b\",\"c\",\"d\",\"e\"}\n")
ars := []string{"a","b","c","d","e"}
print("e.Shuffle(&ars):")
e.Shuffle(&ars)
for _,i := range ars {
print(i)
print(",")
}
print("\n")
print("\n")
print("e.GetHash(\"hello\"):"+e.GetHash("Hello")+"\n")
print("e.RandomString(32):"+e.RandomString(32)+"\n")
// use ew for error warning and ef for error fatal
// e.g.
_, err := goconfig.ReadConfigFile("config")
print("e.Ew(err):")
e.Ew(err)
print("\n")
e.Ef(err) // will exit fatally
}
```