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) ValueParameters & Attributes
| Name | Type | Description |
|---|---|---|
| x | int64 | Input 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)) }