Versions in this module Expand all Collapse all v1 v1.0.0 Jan 19, 2022 Changes in this version + func CallSudo(action SudoAction) error + func CliChoice(question string, choices []string) (int, error) + func CliQuestion(question string) string + func CliQuestionHidden(question string) (string, error) + func CliQuestionYesNo(question string) bool + func CliQuestionYesNoDefault(question string, defaultValue bool) bool + func GetAutoUpdate(configDir *UserConfigDir) (bool, error) + func LoadExternalConfig(filename string, data interface{}) error + func RegisterAction(action SudoAction) + func SaveExternalConfig(filename string, data interface{}) error + func SetAutoUpdate(configDir *UserConfigDir, shouldAutoUpdate bool) (bool, error) + func TryHandleSudo() + type AutoUpdater struct + func NewAutoUpdater(configDir *UserConfigDir, buildVersion, githubRepo string, isPrivate bool, ...) (*AutoUpdater, error) + func (updater *AutoUpdater) TryAutoUpdateSelf() error + func (updater *AutoUpdater) TryManualUpdate() error + type ReplaceExecutableSudoAction struct + NewExe string + func (a ReplaceExecutableSudoAction) Handle(params []string) error + func (a ReplaceExecutableSudoAction) Name() string + func (a ReplaceExecutableSudoAction) Params() []string + type SudoAction interface + Handle func(params []string) error + Name func() string + Params func() []string + type UserConfigDir struct + func NewUserConfigDir(name string) *UserConfigDir + func (userConfigDir *UserConfigDir) GetConfigDir() (string, error) + func (userConfigDir *UserConfigDir) LoadConfig(config string, data interface{}) error + func (userConfigDir *UserConfigDir) SaveConfig(config string, data interface{}) error