Standard library / go/ast
go/ast.Ident.IsExported()
Tests whether the identifier begins with an uppercase Unicode letter. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func (id *Ident) IsExported() boolReturn Value
bool
Tests whether the identifier begins with an uppercase Unicode letter.
Working Example
Example Snippetgo
package main
import ( "fmt" "go/ast")
func main() { fmt.Println(ast.NewIdent("Total").IsExported()) }