safeconv

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package safeconv provides safe integer conversion functions that clamp values at the target type's boundaries instead of silently overflowing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int64ToInt32

func Int64ToInt32(v int64) int32

Int64ToInt32 converts an int64 to int32, clamping at math.MaxInt32 / math.MinInt32.

func IntToInt32

func IntToInt32(v int) int32

IntToInt32 converts an int to int32, clamping at math.MaxInt32 / math.MinInt32.

Types

This section is empty.

Jump to

Keyboard shortcuts

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