Documentation
¶
Overview ¶
Package config is a helper package to facilitate getting and setting config values using Viper.
This package provides functions to read and write configuration settings for the eng CLI tool. It supports various configuration file formats and allows for easy management of local configuration settings.
Key features: - Load configuration from JSON, YAML, TOML, and other formats. - Set and get configuration values programmatically. - Support for environment variable overrides. - Easy integration with the Viper library.
These are local configs related to the eng CLI, not deployment configs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DotfilesRepo ¶ added in v0.14.3
func DotfilesRepo() string
DotfilesRepo checks for the dotfiles repository path in the configuration and prompts the user to confirm it. If the path is not found or the user does not confirm it, the function will call updateDotfilesRepo() to update the path. It logs the start and success of the path checking process and returns the confirmed path as a string.
func Email ¶
func Email() string
Email checks for the user's email in the configuration and prompts the user to confirm it. If the email is not found or the user does not confirm it, the function will call updateEmail() to update the email. It logs the start and success of the email checking process and returns the confirmed email as a string.
func GetDotfilesRepo ¶ added in v0.14.3
func GetDotfilesRepo()
GetDotfilesRepo retrieves the dotfiles repository path from the configuration. If the path is not found in the configuration, it prompts the user to update it. Logs the process of checking and finding the path.
func GetEmail ¶
func GetEmail()
GetEmail retrieves the user's email from the configuration. If the email is not found in the configuration, it prompts the user to update it. Logs the process of checking and finding the email.
func ProxyConfig ¶ added in v0.17.0
ProxyConfig checks for the proxy settings in the configuration and prompts the user to confirm or update them. Returns the current proxy setting as a string and whether it is enabled.
func SetProxyEnabled ¶ added in v0.17.0
func SetProxyEnabled(enabled bool)
SetProxyEnabled sets the proxy enabled/disabled in the config and saves it.
Types ¶
This section is empty.