Standard library / go/constant

go/constant.Float

Floating-point constant category; compare Value.Kind with this constant. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
const Float Kind

Working Example

Example Snippetgo
package main
import (  "fmt"  "go/constant")
func main() { fmt.Println(constant.MakeFloat64(0.5).Kind() == constant.Float) }
Go Reference