Welcome To Golang By Example

Zero Value of Interface in Go (Golang)

Default or zero value of an interface is nil. Below program demonstrates that

package main

import "fmt"
type animal interface {
    breathe()
    walk()
}

func main() {
    var a animal
    fmt.Println(a)
}

Output

nil