zutils

package module
v0.0.0-...-292ea0a Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: MIT Imports: 3 Imported by: 0

README

go-util

This repository contains some utility functionality I commonly use in my go projects.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirstNonEmpty

func FirstNonEmpty[C comparable](possibleValues ...C) C

FirstNonEmpty is a utility function returning the first of the passed values that is not empty/zero

func FirstNonEmptyFnc

func FirstNonEmptyFnc[C comparable](possibleValues ...func() C) C

FirstNonEmptyFnc is a utility function returning the first of the passed values that is not empty/zero. In this function the values are not passed directly but a function that returns the value is passed instead. This enables lazy evaluation

func NewInt

func NewInt(i int) *int

NewInt returns a *int

func RandomString

func RandomString(n int) (string, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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