Skip to content

Instantly share code, notes, and snippets.

@AnatoliiD
Created September 15, 2014 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AnatoliiD/e20a7f245d20b98687c2 to your computer and use it in GitHub Desktop.
Save AnatoliiD/e20a7f245d20b98687c2 to your computer and use it in GitHub Desktop.
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