Standard library / go/constant
go/constant.Complex
Complex constant category; compare Value.Kind with this constant. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
const Complex KindWorking Example
Example Snippetgo
package main
import ( "fmt" "go/constant")
func main() { fmt.Println(constant.MakeImag(constant.MakeInt64(3)).Kind() == constant.Complex) }