Standard library / go/types

go/types.Builtin.Exported()

Reports whether the name starts with an uppercase Unicode letter; this alone does not establish package visibility. Expected stdout: 'false\n'.

Formal Syntax & Structure

go syntaxgo
func (obj *Builtin) Exported() bool

Return Value

bool

Reports whether the name starts with an uppercase Unicode letter; this alone does not establish package visibility.

Working Example

Example Snippetgo
package main
import (  "fmt"  "go/types")
func main() { v := types.Universe.Lookup("len").(*types.Builtin); fmt.Println(v.Exported()) }
Go Reference