variable

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OverrideVersion = version.Get()

OverrideVersion is the latest version, exposed for testing.

Functions

func Empty

func Empty(s string) (string, bool)

Empty is a KeyFunc which always returns true and the empty string.

func Env

func Env(key string) (string, bool)

Env is a KeyFunc which always returns a string

func EnvPresent

func EnvPresent(key string) (string, bool)

EnvPresent is a KeyFunc which returns an environment variable if it is present.

func Expand

func Expand(s string, fns ...KeyFunc) string

Expand expands a string and ignores any errors that occur - keys that are not recognized are replaced with the empty string.

func ExpandStrict

func ExpandStrict(s string, fns ...KeyFunc) (string, error)

ExpandStrict expands a string using a series of common format functions

func Identity

func Identity(key string) (string, bool)

Identity is a KeyFunc that returns the same format rules.

func Versions

func Versions(key string) (string, bool)

Versions is a KeyFunc for retrieving information about the current version.

Types

type KeyFunc

type KeyFunc func(key string) (string, bool)

KeyFunc returns the value associated with the provided key or false if no such key exists.

Jump to

Keyboard shortcuts

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