I wrote this code, and why `map=nil` don't stop the loop?
```go

func mapTest() {

    m := map[int]int{1: 1, 2: 2}

    for k, v := range m {

        println(k, v)

        m = nil

    }

}

```

output:

1 1

2 2


I don't understand when I set  `m = nil`, the loop is not stop. m doesn't 
seem to be affected.


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to