Standard library / go/constant

go/constant.MakeInt64()

Create an integer constant from a signed 64-bit integer. Expected stdout: '-42\n'.

Formal Syntax & Structure

go syntaxgo
func MakeInt64(x int64) Value

Parameters & Attributes

NameTypeDescription
xint64Input constant or Go value as specified by the function.

Return Value

Value

Create an integer constant from a signed 64-bit integer.

Working Example

Example Snippetgo
package main
import (  "fmt"  "go/constant")
func main() { fmt.Println(constant.MakeInt64(-42)) }
Go Reference