env

package
v0.0.0-...-43d7ba3 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package env implements functions to get values from environment variables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInt

func GetInt(key string, defaultVal int) (val int, exists bool, err error)

GetInt gets the value of an environment variable as an int. If the key wasn't found, the default value will be returned, and exists will be false.

If the conversion from string to int fails, the default value will be returned, along with an error.

func GetString

func GetString(key string, defaultVal string) (val string, found bool)

GetString gets the value of an environment variable as a string. If the key wasn't found, the default value will be returned, and found will be false.

Types

This section is empty.

Jump to

Keyboard shortcuts

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