literals

package
v0.0.0-...-5da7bf1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Float

func Float[T floatLit](value T) *ast.BasicLit

Float returns a floating-point literal for the given value. Supported types are float32 and float64.

func Int

func Int[T integerLit](value T) *ast.BasicLit

Int returns an integer literal for the given value. Supported types are int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, and uintptr.

func String

func String[T stringLit](value T) *ast.BasicLit

String returns a string literal for the given value. Supported types are string, int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, uintptr, float32, float64, complex64, complex128, and bool.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL