Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

utils source pure

Functions 6

func FormatBool

1func FormatBool(v bool) string
source

FormatBool converts a boolean to "true" or "false".

func FormatInt

1func FormatInt(v any) string
source

FormatInt converts any signed integer type to its base-10 string representation. It accepts int8, int16, int32, int64 and int, and panics on any other type.

func FormatUint

1func FormatUint(v any) string
source

FormatUint converts any unsigned integer type to its base-10 string representation. It accepts uint8, uint16, uint32, uint64 and uint, and panics on any other type.

func Int64ToString

1func Int64ToString(v int64) string
source

Int64ToString returns the base-10 string representation of an int64.

func SafeParseInt64

1func SafeParseInt64(value string) int64
source

SafeParseInt64 parses a base-10 string into an int64, panicking when the input is not a valid int64.

func Uint64ToString

1func Uint64ToString(v uint64) string
source

Uint64ToString returns the base-10 string representation of a uint64.

Imports 2

Source Files 2