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