env

package
Version: v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvKey   = "env"
	EnvOrKey = "envOr"
)

Keys to be used in templates for the functions in this package.

Variables

This section is empty.

Functions

func Env

func Env(key string) (string, error)

Env will return the specified environment variable, or an error if it can not be found

<%= env("GOPATH") %>

func EnvOr

func EnvOr(key string, def string) string

Env will return the specified environment variable, or the second argument, if not found

<%= envOr("GOPATH", "~/go") %>

func New

func New() hctx.Map

New returns a map of the helpers within this package.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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