-
Notifications
You must be signed in to change notification settings - Fork 0
/
util.go
65 lines (61 loc) · 2.06 KB
/
util.go
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
62
63
64
65
package main
import (
"net/url"
"golang.org/x/net/context"
)
func mustParseURL(urlString string) string {
u, _ := url.Parse(urlString)
return u.String()
}
func loadSomeData(c context.Context) error {
word := &Word{
Word: "GIF",
Pronunciations: []Pronunciation{
Pronunciation{
Rating: 65,
Pronunciation: "jiff",
IPA: "/ˈdʒɪf/",
Description: "Choosy developers choose GIF. Like the peanut butter.",
Sources: []PronunciationSource{
PronunciationSource{
Description: "The original creator of the GIF format, Steve Wilhite at Compuserve, documented this pronunciation. In 2013 at the Webby Award ceremony, he publicly rejected the alternative pronunciation.",
},
PronunciationSource{
URL: mustParseURL("http://en.wikipedia.org/wiki/GIF#Pronunciation"),
Description: "Wikipedia",
},
PronunciationSource{
URL: mustParseURL("http://www.cnn.com/2013/05/22/tech/web/pronounce-gif/"),
},
PronunciationSource{
URL: mustParseURL("http://twitpic.com/csdcxf"),
},
PronunciationSource{
URL: mustParseURL("https://twitter.com/Jif/status/337277962837704705"),
},
PronunciationSource{
URL: mustParseURL("http://www.olsenhome.com/gif/"),
},
PronunciationSource{
URL: mustParseURL("https://www.yahoo.com/tech/did-you-just-say-mem-to-ensure-that-you-dont-85736013339.html"),
},
},
},
Pronunciation{
Rating: 35,
Pronunciation: "g'if",
IPA: "/ˈɡɪf/",
Description: "Like gift without the T.",
Sources: []PronunciationSource{
PronunciationSource{
Description: "Many people believe that because other short G- words use the hard-G sound, this should too. The English language is strongly based on the argumentum ad populum; because a large number of people prefer this pronunciation, it has been accepted by most dictionaries.",
},
PronunciationSource{
URL: mustParseURL("http://howtoreallypronouncegif.com/"),
},
},
},
},
}
return SetWord(c, word)
}