We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 081f5e3 commit 2ea39c3Copy full SHA for 2ea39c3
codes/ch5_maps/create-a-map.go
@@ -0,0 +1,21 @@
1
+package main
2
+
3
+/**
4
+ * Note: The code will not run and throw an error: prefixMap declared and not used
5
+ * As we have declare map and not used in and this is error in go-lang
6
+ */
7
+func main() {
8
9
+ /**
10
+ * Declare a map of map type with string.
11
+ * var <variable-name> map[<key-type>] <value-type>
12
13
+ var prefixMap map[string] string
14
15
16
+ * make will initialize the map; if we don't use make
17
+ * declaration will set to null;
18
19
+ prefixMap = make(map[string] string)
20
21
+}
0 commit comments