Zero Values

Variables declared without an explicit initial value are given their zero value.
The zero value is:

  • 0 for numeric types,
  • false for the boolean type, and
  • "" (the empty string) for strings.
  • nil for slice
s := "" 
s := make([]string, 3) //[   ]
var s string 
var s = "" 
var s string = ""

All Types

int  int8  int16  int32  int64
uint uint8 uint16 uint32 uint64 uintptr
byte // alias for uint8
rune // alias for int32
     // represents a Unicode code point
float32 float64
complex64 complex128