env

package
v0.0.0-...-1252c86 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: Unlicense Imports: 3 Imported by: 1

README

Environment Helpers

This is a helper for accessing environment variables:

var (
    mysqlUser     = env.Read("MYSQL_USER").Default("root").AsString().Get()
    mysqlPassword = env.Read("MYSQL_PASSWORD").AsString().Get()
    mysqlHost     = env.Read("MYSQL_HOST").Default("127.0.0.1").AsString().Get()
    mysqlPort     = env.Read("MYSQL_PORT").Default("3306").AsNumber().Min(1).Max(65535).Get()
)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(name string, mustExist ...bool) *parsable.Parsable

Types

This section is empty.

Jump to

Keyboard shortcuts

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