Skip to content

Commit

Permalink
Add var keyword to examples (quii#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlusthaus authored and quii committed Jul 19, 2019
1 parent ec54187 commit 8c94f28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,11 @@ var m map[string]string
Instead, you can initialize an empty map like we were doing above, or use the `make` keyword to create a map for you:

```go
dictionary = map[string]string{}
var dictionary = map[string]string{}

// OR

dictionary = make(map[string]string)
var dictionary = make(map[string]string)
```

Both approaches create an empty `hash map` and point `dictionary` at it. Which ensures that you will never get a runtime panic.
Expand Down

0 comments on commit 8c94f28

Please sign in to comment.