Standard library / go/types
go/types.Nil.Id()
Returns the unexported predeclared identifier with the underscore package qualifier in Go 1.23.2. Expected stdout: '_.nil\n'.
Formal Syntax & Structure
go syntaxgo
func (obj *Nil) Id() stringReturn Value
string
Returns the unexported predeclared identifier with the underscore package qualifier in Go 1.
Working Example
Example Snippetgo
package main
import ( "fmt" "go/types")
func main() { v := types.Universe.Lookup("nil").(*types.Nil); fmt.Println(v.Id()) }