Learning about formatIO
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func do(m1 *map[int]int) {
|
||||
(*m1)[0] = 0
|
||||
|
||||
*m1 = make(map[int]int)
|
||||
(*m1)[10] = 10
|
||||
fmt.Println("m1", *m1)
|
||||
}
|
||||
|
||||
func main() {
|
||||
m := map[int]int{1: 21, 2: 56, 3: 45}
|
||||
|
||||
fmt.Println("m", m)
|
||||
do(&m)
|
||||
fmt.Println("m", m)
|
||||
}
|
||||
Reference in New Issue
Block a user