forked from mauricioabreu/golings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
info.toml
278 lines (237 loc) · 6.95 KB
/
info.toml
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
[[exercises]]
name = "variables1"
path = "exercises/variables/variables1/main.go"
mode = "compile"
hint = """
Variables must have names."""
[[exercises]]
name = "variables2"
path = "exercises/variables/variables2/main.go"
mode = "compile"
hint = """
It is missing a symbol used to declare and initialize variables."""
[[exercises]]
name = "variables3"
path = "exercises/variables/variables3/main.go"
mode = "compile"
hint = """
Could it be missing the variable type?."""
[[exercises]]
name = "variables4"
path = "exercises/variables/variables4/main.go"
mode = "compile"
hint = """
Variables can be redeclared in new blocks, but it is missing something. What is it?."""
[[exercises]]
name = "variables5"
path = "exercises/variables/variables5/main.go"
mode = "compile"
hint = """
Constants need initialization."""
[[exercises]]
name = "variables6"
path = "exercises/variables/variables6/main.go"
mode = "compile"
hint = """
Constants can't be changed."""
[[exercises]]
name = "functions1"
path = "exercises/functions/functions1/main.go"
mode = "compile"
hint = """
The main function is calling another function that it expects to exist.
It expects a function named `call_me` to exist and receive no arguments."""
[[exercises]]
name = "functions2"
path = "exercises/functions/functions2/main.go"
mode = "compile"
hint = """
Function parameters need to have their types explicitly declared."""
[[exercises]]
name = "functions3"
path = "exercises/functions/functions3/main.go"
mode = "compile"
hint = """
When a function expect arguments, you must pass values to them."""
[[exercises]]
name = "functions4"
path = "exercises/functions/functions4/main.go"
mode = "compile"
hint = """
Functions that return values must have return types declared in the function signature."""
[[exercises]]
name = "if1"
path = "exercises/if/if1/main_test.go"
mode = "test"
hint = "No hints this time"
[[exercises]]
name = "if2"
path = "exercises/if/if2/main_test.go"
mode = "test"
hint = "No hints this time"
[[exercises]]
name = "switch1"
path = "exercises/switch/switch1/main.go"
mode = "compile"
hint = """
Switch flow is missing a variable to evaluate the statement."""
[[exercises]]
name = "switch2"
path = "exercises/switch/switch2/main.go"
mode = "compile"
hint = """
Switch without a condition is possible, but that case statement needs a boolean evaluation."""
[[exercises]]
name = "switch3"
path = "exercises/switch/switch3/main_test.go"
mode = "test"
hint = "No hints this time"
[[exercises]]
name = "primitive_types1"
path = "exercises/primitive_types/primitive_types1/main.go"
mode = "compile"
hint = "No hints this time"
[[exercises]]
name = "primitive_types2"
path = "exercises/primitive_types/primitive_types2/main.go"
mode = "compile"
hint = "No hints this time"
[[exercises]]
name = "primitive_types3"
path = "exercises/primitive_types/primitive_types3/main.go"
mode = "compile"
hint = "'%s' is used to format strings"
[[exercises]]
name = "primitive_types4"
path = "exercises/primitive_types/primitive_types4/main.go"
mode = "compile"
hint = """
byte can hold from 0 to 255. Could it store a character?"""
[[exercises]]
name = "primitive_types5"
path = "exercises/primitive_types/primitive_types5/main.go"
mode = "compile"
hint = """
These names seem misleading, no? But they are close to be correct.
Check this documentation to understand the variety of
numeric data types: https://go.dev/ref/spec#Numeric_types"""
[[exercises]]
name = "arrays1"
path = "exercises/arrays/arrays1/main.go"
mode = "compile"
hint = """
Arrays are zero-based indexing."""
[[exercises]]
name = "arrays2"
path = "exercises/arrays/arrays2/main.go"
mode = "compile"
hint = """
Unlike languages like Python or Ruby, go does not let you have arrays with mixed data types."""
[[exercises]]
name = "slices1"
path = "exercises/slices/slices1/main.go"
mode = "compile"
hint = """
Slices can be created with the make function and they must have a type."""
[[exercises]]
name = "slices2"
path = "exercises/slices/slices2/main.go"
mode = "compile"
hint = """
Slices can be created from arrays and you can slice it with a range, with the [low:high] syntax."""
[[exercises]]
name = "slices3"
path = "exercises/slices/slices3/main.go"
mode = "compile"
hint = """
Append is used to add elements to an existing slice.
Add some elements and read the output.
If you are still confuse about the append function, don't worry, check out
the spec: https://go.dev/ref/spec#Appending_and_copying_slices"""
[[exercises]]
name = "slices4"
path = "exercises/slices/slices4/main_test.go"
mode = "test"
hint = "No hints this time"
[[exercises]]
name = "maps1"
path = "exercises/maps/maps1/main.go"
mode = "compile"
hint = """
Maps have types, for the key and the values.
To make it compile you need to define types.
Indexing is similar to setting values.
Check the spec for more info: https://go.dev/ref/spec#Map_types"""
[[exercises]]
name = "maps2"
path = "exercises/maps/maps2/main.go"
mode = "compile"
hint = """
Very similar to maps1, but this time you can initialize a new map
in the same line with a different syntax.
"""
[[exercises]]
name = "maps3"
path = "exercises/maps/maps3/main_test.go"
mode = "test"
hint = "No hints this time"
[[exercises]]
name = "range1"
path = "exercises/range/range1/main.go"
mode = "compile"
hint = """
You can use the range keyword to iterate over collections. Arrays, slices and maps are iterable
data types."""
[[exercises]]
name = "range2"
path = "exercises/range/range2/main.go"
mode = "compile"
hint = """
Just like slices and array, you can use the range keyword to iterate over maps values.
One slightly difference between iterating over arrays and slices is that with maps we iterate
over keys and their values."""
[[exercises]]
name = "range3"
path = "exercises/range/range3/main_test.go"
mode = "test"
hint = "No hints this time"
[[exercises]]
name = "structs1"
path = "exercises/structs/structs1/main.go"
mode = "compile"
hint = """
Structs are created using the 'type structName struct {}' syntax.
Fields can be declared inside the brackets. They must have their types
declared along their names.
"""
[[exercises]]
name = "structs2"
path = "exercises/structs/structs2/main.go"
mode = "compile"
hint = """
Embedding is achieved using just the struct name.
After embedding a struct, we are able to access the fields through the base struct, without having to
specify the full path to the field. But you can do if you want.
"""
[[exercises]]
name = "anonymous_functions1"
path = "exercises/anonymous_functions/anonymous_functions1/main.go"
mode = "compile"
hint = """
The function needs a string to print
"""
[[exercises]]
name = "anonymous_functions2"
path = "exercises/anonymous_functions/anonymous_functions2/main.go"
mode = "compile"
hint = """
Maybe you should call the function with a param
"""
[[exercises]]
name = "anonymous_functions3"
path = "exercises/anonymous_functions/anonymous_functions3/main.go"
mode = "compile"
hint = """
1 - updateStatus() function should return an orderStatus index like orderStatus[index]
2 - Maybe you should call anonymous_func once more time
"""