utils

package
v0.23.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Digest

func Digest(obj any) string

Digest returns a SHA-256 hash of the input object. If the object is a string or byte slice, it hashes the raw data. For other types, it encodes the object as JSON before hashing.

func FirstSet

func FirstSet[T comparable](in ...T) T

FirstSet returns the first non-zero value from the input slice, or the zero value if all are zero.

Types

This section is empty.

Jump to

Keyboard shortcuts

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