Standard library / go/types
go/types.Nil
Represents the predeclared nil value. Expected stdout: 'nil\n'.
Formal Syntax & Structure
go syntaxgo
type Nil struct {}Working Example
Example Snippetgo
package main
import ( "fmt" "go/types")
func main() { v := types.Universe.Lookup("nil").(*types.Nil); fmt.Println(v.Name()) }