Standard library / go/types
go/types.IsInteger
BasicInfo mask for integer basic types. Test using bitwise AND, not equality. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
const IsInteger BasicInfoWorking Example
Example Snippetgo
package main
import ( "fmt" "go/types")
func main() { fmt.Println(types.Typ[types.Int].Info()&types.IsInteger != 0) }