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