safeconvert

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 2 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int64ToUint64

func Int64ToUint64(i int64) (uint64, error)

Int64ToUint64 converts int64 to uint64 safely, checking for negative values.

func IntToUint

func IntToUint(i int) (uint, error)

IntToUint converts int to uint safely, checking for negative values.

func Uint64ToInt

func Uint64ToInt(u uint64) (int, error)

SafeUint64ToInt converts uint64 to int safely, checking for overflow.

func Uint64ToInt64

func Uint64ToInt64(u uint64) (int64, error)

Uint64ToInt64 converts uint64 to int64 safely, checking for overflow.

func UintToInt

func UintToInt(u uint) (int, error)

UintToInt converts uint to int safely, checking for overflow.

Types

This section is empty.

Jump to

Keyboard shortcuts

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