examples

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForEachInput

func ForEachInput(r io.Reader, callback func(text string) error) error

ForEachInput calls the given callback function for each line of input.

func HasEnvVar

func HasEnvVar(key string) string

HasEnvVar returns the value of the environment variable with the given key. It panics if the environment variable is not set.

func HasEnvVarOr added in v0.2.0

func HasEnvVarOr(key string, alt string) string

HasEnvVarOr returns the value of the environment variable with the given key. It returns the alternative value if the environment variable is not set.

func LoadDotenv

func LoadDotenv()

LoadDotenv loads the .env file if it exists.

func MarshalJSON

func MarshalJSON(data any) string

MarshalJSON returns the JSON string representation of the input data

Types

This section is empty.

Jump to

Keyboard shortcuts

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