cfge

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnv

func GetEnv(variableName string) (string, error)

GetEnv returns a string value of the environment variable name provided. It returns an error in the event of the variable not existing.

func GetEnvBool

func GetEnvBool(variableName string) (bool, error)

GetEnvBool returns a bool value of the environment variable name provided. It returns an error in the event of the variable not existing or parsing error.

func GetEnvBoolOrDefault

func GetEnvBoolOrDefault(variableName string, defaultValue bool) bool

GetEnvBoolOrDefault returns a bool value of the environment variable name provided. In case there is an error, or the variable doesn't exist, it will return the default provided value.

func GetEnvInt

func GetEnvInt(variableName string) (int, error)

GetEnvInt returns an int value of the environment variable name provided. It returns an error in the event of the variable not existing or parsing error.

func GetEnvIntOrDefault

func GetEnvIntOrDefault(variableName string, defaultValue int) int

GetEnvIntOrDefault returns an int value of the environment variable name provided. In case there is an error, or the variable doesn't exist, it will return the default provided value.

func GetEnvOrDefault

func GetEnvOrDefault(variableName string, defaultValue string) string

GetEnvOrDefault returns a string value of the environment variable name provided. In case there is an error, or the variable doesn't exist, it will return the default provided value.

func LoadDefaultEnvFile

func LoadDefaultEnvFile()

func LoadEnvFile

func LoadEnvFile(envFilePath string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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