step

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 5 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 PathEnv = "STEPPATH"

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

Variables

This section is empty.

Functions

func Abs

func Abs(path string) string

Abs 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 Home

func Home() string

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

func Path

func Path() string

Path 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'.

Types

This section is empty.

Jump to

Keyboard shortcuts

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