Created
September 15, 2014 06:29
-
-
Save AnatoliiD/e20a7f245d20b98687c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func main() { | |
var z []int | |
z2 = []int{} | |
fmt.Println(z == nil) // prints true | |
fmt.Println(z2 == nil) // prints false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment