os

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Namespace

type Namespace struct {
	// contains filtered or unexported fields
}

Namespace defines the methods for the os to be used as template functions.

func New

func New(d *deps.Deps) *Namespace

Creates a new date Namespace

func (*Namespace) Env

func (ns *Namespace) Env(key string) string

Env

Retrieve an environment variable by key

Example: {{ env "APP_DEBUG" }}

func (*Namespace) ExpandEnv

func (ns *Namespace) ExpandEnv(str string) string

ExpandEnv

Retrieve an environment variable by key and substitute variables in a string.

Example: {{ expandEnv "Welcome to $APP_NAME" }}

Jump to

Keyboard shortcuts

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