xconv

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseBool

func ParseBool(s string) (bool, error)

ParseBool returns the boolean value represented by the string. It accepts for true: 1, t, true, OK, yes; for false: 0, f, false, no, n (case-insensitive). Any other value returns false and an error. This works very similar to Go's strconv.ParseBool except that more values are accepted, and it is case-insensitive.

func SignedAsInt64

func SignedAsInt64(n any) int64

SignedAsInt64 returns n as int64. Panics when n is not (a pointer value of) int64, int, int8, int16, int32.

func SignedAsInt64Ptr

func SignedAsInt64Ptr(n any) *int64

SignedAsInt64Ptr returns n as *int64. Panics when n is not (a pointer value of) int64, int, int8, int16, int32.

func UnsignedAsUint64

func UnsignedAsUint64(n any) uint64

UnsignedAsUint64 returns n as uint64. Panics when n is not (a pointer value of) uint64, uint, uint8, uint16, uint32.

func UnsignedAsUint64Ptr

func UnsignedAsUint64Ptr(n any) *uint64

UnsignedAsUint64Ptr returns n as *uint64. Panics when n is not (a pointer value of) uint64, uint, uint8, uint16, uint32.

Types

This section is empty.

Jump to

Keyboard shortcuts

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