-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathnames.go
More file actions
61 lines (55 loc) · 823 Bytes
/
names.go
File metadata and controls
61 lines (55 loc) · 823 Bytes
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
53
54
55
56
57
58
59
60
61
package main
import (
"fmt"
// not crypto, not significant
"math/rand"
"time"
)
var Adjectives []string
var Nouns []string
func init() {
Adjectives = []string{
"hardened",
"toughened",
"annealed",
"tempered",
"fortified",
"bastioned",
"bolstered",
"reinforced",
"inviolable",
"impregnable",
"unassailable",
"impervious",
"unbreakable",
"infrangible",
"stalwart",
"sturdy",
"stouthearted",
}
Nouns = []string{
"garrison",
"fortress",
"castle",
"keep",
"outpost",
"coffer",
"zone",
"sanctuary",
"refuge",
"asylum",
"hold",
"oubliette",
"donjon",
"dungeon",
"gaol",
}
}
func init() {
rand.Seed(time.Now().Unix())
}
func RandomName() string {
return fmt.Sprintf("%s-%s",
Adjectives[rand.Intn(len(Adjectives))],
Nouns[rand.Intn(len(Nouns))])
}