config

package
v0.17.2-rc3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

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 added in v0.14.0

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 added in v0.14.0

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