Standard library / go/types
go/types.Var.Anonymous()
Legacy synonym of Embedded; prefer Embedded. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func (obj *Var) Anonymous() boolReturn Value
bool
Legacy synonym of Embedded; prefer Embedded.
Working Example
Example Snippetgo
package main
import ( "fmt" "go/types")
func main() { v := types.NewField(0, nil, "T", types.Typ[types.Int], true); fmt.Println(v.Anonymous()) }