forked from katzien/go-structure-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.go
116 lines (112 loc) · 5.01 KB
/
data.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
package main
// PopulateBeers populates the Cellar variable with Beers
func PopulateBeers() {
defaultBeers := []Beer{
{
Name: "Pliny the Elder",
Brewery: "Russian River Brewing Company",
Abv: 8,
ShortDesc: "Pliny the Elder is brewed with Amarillo, " +
"Centennial, CTZ, and Simcoe hops. It is well-balanced with " +
"malt, hops, and alcohol, slightly bitter with a fresh hop " +
"aroma of floral, citrus, and pine.",
},
{
Name: "Oatmeal Stout",
Brewery: "Samuel Smith",
Abv: 5,
ShortDesc: "Brewed with well water (the original well at the " +
"Old Brewery, sunk in 1758, is still in use, with the hard well " +
"water being drawn from 85 feet underground); fermented in " +
"‘stone Yorkshire squares’ to create an almost opaque, " +
"wonderfully silky and smooth textured ale with a complex " +
"medium dry palate and bittersweet finish.",
},
{
Name: "Märzen",
Brewery: "Schlenkerla",
Abv: 5,
ShortDesc: "Bamberg's speciality, a dark, bottom fermented " +
"smokebeer, brewed with Original Schlenkerla Smokemalt from " +
"the Schlenkerla maltings and tapped according to old tradition " +
"directly from the gravity-fed oakwood cask in the historical " +
"brewery tavern.",
},
{
Name: "Duvel",
Brewery: "Duvel Moortgat",
Abv: 9,
ShortDesc: "A Duvel is still seen as the reference among strong " +
"golden ales. Its bouquet is lively and tickles the nose with an " +
"element of citrus which even tends towards grapefruit thanks to " +
"the use of only the highest-quality hop varieties.",
},
{
Name: "Negra",
Brewery: "Modelo",
Abv: 5,
ShortDesc: "Brewed longer to enhance the flavors, this Munich " +
"Dunkel-style Lager gives way to a rich flavor and remarkably " +
"smooth taste.",
},
{
Name: "Guinness Draught",
Brewery: "Guinness Ltd.",
Abv: 4,
ShortDesc: "Pours dark brown, almost black with solid lasting light brown head. " +
"Aroma of bitter cocoa, light coffee and roasted malt. " +
"Body is light sweet, medium bitter. " +
"Body is light to medium, texture almost thin and carbonation average. " +
"Finish is medium bitter cocoa with more pronounced roast flavor. Smooth drinker.",
},
{
Name: "XX Lager",
Brewery: "Cuahutemoc Moctezuma",
Abv: 4.2,
ShortDesc: "A crisp, refreshing, light-bodied malt-flavored beer with a well-balanced finish. " +
"A Lager that drinks like a Pilsner. A liquid embodiment of living life to the fullest. " +
"A beverage made from pure spring water and the choicest hops. A beer with such good taste, it’s chosen you to drink it.",
},
{
Name: "Tecate",
Brewery: "Cuahutemoc Moctezuma",
Abv: 5,
ShortDesc: "Very smooth, medium bodied brew. Malt sweetness is thin, and can be likened to diluted sugar water. " +
"Touch of fructose-like sweetness. Light citric hop flavours gently prick the palate with tea-like notes that follow and fade quickly. " +
"Finishes a bit dry with husk tannins and a pasty mouthfeel.",
},
{
Name: "Sol",
Brewery: "Cuahutemoc Moctezuma",
Abv: 5,
ShortDesc: "While Corona wins the marketing wars in the U.S., Sol is the winning brand in much of Mexico, despite not being a standout in any respect. " +
"You see the logo plastered everywhere and it’s seemingly on every restaurant and bar menu. Like Corona, it’s simple and inoffensive, " +
"but still slightly more flavorful than your typical American macrobrew. At its best ice cold, and progressively worse as it gets warmer.",
},
{
Name: "Corona",
Brewery: "Cuahutemoc Moctezuma",
Abv: 5,
ShortDesc: "One of the five best-selling beers in the world, but it usually tastes better in Mexico, " +
"where the bottles don’t have so much time in transit and on shelves. (Sunlight coming through clear bottles is never a good thing for beer.) " +
"This is the typical “drink all afternoon” beer, working well on its own or with a plate of tacos. Refreshing with a lime.",
},
}
if err := db.SaveBeer(defaultBeers...); err != nil {
panic(err.Error())
}
}
// PopulateReviews populates the Reviews variable with Reviews
func PopulateReviews() {
defaultReviews := []Review{
{BeerID: 1, FirstName: "Joe", LastName: "Tribiani", Score: 5, Text: "This is good but this is not pizza!"},
{BeerID: 2, FirstName: "Chandler", LastName: "Bing", Score: 1, Text: "I would SO NOT drink this ever again."},
{BeerID: 1, FirstName: "Ross", LastName: "Geller", Score: 4, Text: "Drank while on a break, was pretty good!"},
{BeerID: 2, FirstName: "Phoebe", LastName: "Buffay", Score: 2, Text: "Wasn't that great, so I gave it to my smelly cat."},
{BeerID: 1, FirstName: "Monica", LastName: "Geller", Score: 5, Text: "AMAZING! Like Chandler's jokes!"},
{BeerID: 2, FirstName: "Rachel", LastName: "Green", Score: 5, Text: "So yummy, just like my beef and custard trifle."},
}
if err := db.SaveReview(defaultReviews...); err != nil {
panic(err.Error())
}
}