Standard library / go/types

go/types.Basic

Represents a predeclared basic type or an untyped basic category. Expected stdout: 'int\n'.

Formal Syntax & Structure

go syntaxgo
type Basic struct {}

Working Example

Example Snippetgo
package main
import (  "fmt"  "go/types")
func main() { fmt.Println(types.Typ[types.Int].Name()) }
Go Reference