v0.22.2 Latest Latest

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

Go to latest
Published: Sep 1, 2021 License: CC0-1.0 Imports: 19 Imported by: 0




This section is empty.


View Source
var (
	WorkTreePath string = ".git/lab"
	WorkTreeName string = "lab"

default path of worktree lab.toml file

View Source
var MainConfig *viper.Viper

MainConfig represents the loaded config


func CI added in v0.13.0

func CI() (string, string, string)

CI returns credentials suitable for use within GitLab CI or empty strings if none found.

func ConvertHCLtoTOML added in v0.22.1

func ConvertHCLtoTOML(oldpath string, newpath string, file string)

ConvertHCLtoTOML converts an .hcl file to a .toml file

func GetToken added in v0.22.1

func GetToken() string

GetToken returns a token string from the config file. The token string can be cleartext or returned from a password manager or encryption utility.

func LoadConfig added in v0.22.1

func LoadConfig(configpath string, configname string) *viper.Viper

LoadConfig loads a config file specified by configpath and configname. The configname must not have a '.toml' extension. If configpath and/or configname are unspecified, the worktree defaults will be used.

func LoadMainConfig added in v0.22.1

func LoadMainConfig() (string, string, string, string, bool)

LoadMainConfig loads the main config file and returns a tuple of

host, user, token, ca_file, skipVerify

func New

func New(confpath string, r io.Reader) error

New prompts the user for the default config values to use with lab, and save them to the provided confpath (default: ~/.config/lab.hcl)

func UserConfigError added in v0.22.1

func UserConfigError()

UserConfigError returns a default error message about authentication

func WriteConfigEntry added in v0.22.1

func WriteConfigEntry(desc string, value interface{}, configpath string, configname string)

WriteConfigEntry writes a value specified by desc and value to the configfile specified by configpath and configname. If configpath and/or configname are unspecified, the worktree defaults will be used.


This section is empty.

Jump to

Keyboard shortcuts

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