helpers: github.com/gobuffalo/helpers/env Index | Files

package env

import "github.com/gobuffalo/helpers/env"

Index

Package Files

env.go

Constants

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

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

func Env Uses

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 Uses

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 Uses

func New() hctx.Map

New returns a map of the helpers within this package.

Package env imports 3 packages (graph) and is imported by 1 packages. Updated 2020-01-20. Refresh now. Tools for package owners.