config

package
v0.0.0-...-1a11905 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

View Source
const HomeEnv = "HOME"

HomeEnv defines the name of the environment variable that can overwrite the default home directory.

View Source
const StepPathEnv = "STEPPATH"

StepPathEnv defines the name of the environment variable that can overwrite the default configuration path.

Variables

This section is empty.

Functions

func Home

func Home() string

Home returns the user home directory using the environment variable HOME or the os/user package.

func ReleaseDate

func ReleaseDate() string

ReleaseDate returns the time of when the binary was built

func Set

func Set(n, v, t string)

Set updates the Version and ReleaseDate

func StepAbs

func StepAbs(path string) string

StepAbs returns the given path relative to the StepPath if it's not an absolute path, relative to the home directory using the special string "~/", or relative to the working directory using "./"

Relative paths like 'certs/root_ca.crt' will be converted to '$STEPPATH/certs/root_ca.crt', but paths like './certs/root_ca.crt' will be relative to the current directory. Home relative paths like ~/certs/root_ca.crt will be converted to '$HOME/certs/root_ca.crt'. And absolute paths like '/certs/root_ca.crt' will remain the same.

func StepPath

func StepPath() string

StepPath returns the path for the step configuration directory, this is defined by the environment variable STEPPATH or if this is not set it will default to '$HOME/.step'.

func Version

func Version() string

Version returns the current version of the binary

Types

This section is empty.

Jump to

Keyboard shortcuts

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