Add all the A tasks
This commit is contained in:
parent
2dd7375f96
commit
051504d65b
1608 changed files with 18584 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
// declare a nil map variable, for maps from string to int
|
||||
var x map[string] int
|
||||
|
||||
// make an empty map
|
||||
x = make(map[string] int)
|
||||
|
||||
// make an empty map with an initial capacity
|
||||
x = make(map[string] int, 42)
|
||||
|
||||
// set a value
|
||||
x["foo"] = 3
|
||||
|
||||
// make a map with a literal
|
||||
x = map[string] int {
|
||||
"foo": 2, "bar": 42, "baz": -1,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue