env

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2017 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Current

func Current() string

Current returns current Wechy environment

func GetCurrentDomain

func GetCurrentDomain() string

GetCurrentDomain returns Wechy domain based on current environment variables

func GetEnvOrDefault

func GetEnvOrDefault(name string, defaultValue string) string

GetEnvOrDefault retrieves the value of the environment variable named by the key. It returns the value if available, otherwise returns defaultValue

func IsDevelopment

func IsDevelopment() bool

IsDevelopment returns true on Wechy production environment

func IsProduction

func IsProduction() bool

IsProduction returns true on Wechy production environment

func IsStaging

func IsStaging() bool

IsStaging returns true on Wechy production environment

func IsTest

func IsTest() bool

IsTest returns true on Wechy production environment

func MustGet

func MustGet(name string) string

MustGet returns environment variable or panic

func Path

func Path(p ...string) string

Path returns root path of project + given path

Types

This section is empty.

Jump to

Keyboard shortcuts

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