util

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 2 Imported by: 3

Documentation

Overview

Package util adds some utility functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnv

func GetEnv(name string, defaultValue string) string

Get environment variable with default value.

func GetEnvInt

func GetEnvInt(name string, defaultValue int) int

Get integer environment variable with default value.

func Map

func Map[J any, K any](in []J, f func(J) *K) []K

Map the items in an input slice to something else, omitting null values

func NullMap

func NullMap[J any, K any](in []J, f func(J) K) []K

Map the items in an input slice to something else, leaving null values

Types

This section is empty.

Jump to

Keyboard shortcuts

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