convert

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package convert provides utility functions for safe type conversions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SafeConvertUint64ToUint32

func SafeConvertUint64ToUint32(value uint64) uint32

SafeConvertUint64ToUint32 safely converts a uint64 to uint32. If the value exceeds the maximum uint32 value, it returns 0.

func ToSHA256 added in v1.4.4

func ToSHA256(v any) (string, error)

ToSHA256 takes any value, marshals it to JSON, and returns the SHA256 hash of the JSON bytes as a hex string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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