Standard library / go/types
go/types.Basic.Kind()
Returns the basic kind. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func (b *Basic) Kind() BasicKindReturn Value
BasicKind
Returns the basic kind.
Working Example
Example Snippetgo
package main
import ( "fmt" "go/types")
func main() { fmt.Println(types.Typ[types.Int].Kind() == types.Int) }