utils

package
v0.15.6 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capitalize

func Capitalize(s string) string

Capitalize returns a capitalized version of a string

func ContainsString

func ContainsString(s []string, v string) bool

ContainsString checks if `v` is present on slice `s`

func ReadEnvBool

func ReadEnvBool(key string) bool

ReadEnvBool read and parse boolean environment variables. Will return `false` if the variable is not a `bool`

func ReadEnvInt

func ReadEnvInt(key string) int

ReadEnvInt read an integer environment variables. Will return `0` if the variable is not a `bool`

func ReadEnvString

func ReadEnvString(key string) string

ReadEnvString read string environment variables. This function is a wrapper function to 'os.Getenv()'

func ReadEnvStringArray added in v0.9.0

func ReadEnvStringArray(key string) []string

ReadEnvStringArray read an array of string environment variables. Must be comma-separated Automatically trims all values

func RemoveEmptyStrings

func RemoveEmptyStrings(s []string) []string

RemoveEmptyStrings remove empty strings from a slice

Types

This section is empty.

Jump to

Keyboard shortcuts

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