package env
import "github.com/gobuffalo/plush/v5/helpers/env"
Index ¶
- Constants
- func Env(key string) (string, error)
- func EnvOr(key string, def string) string
- func New() hctx.Map
Constants ¶
const ( EnvKey = "env" EnvOrKey = "envOr" )
Keys to be used in templates for the functions in this package.
Functions ¶
func Env ¶
Env will return the specified environment variable, or an error if it can not be found
<%= env("GOPATH") %>
func EnvOr ¶
Env will return the specified environment variable, or the second argument, if not found
<%= envOr("GOPATH", "~/go") %>
func New ¶
New returns a map of the helpers within this package.
Source Files ¶
- Version
- v5.0.5 (latest)
- Published
- May 23, 2025
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 2 weeks ago –
Tools for package owners.