flag

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SSHManagerVersion = "v1.1.0"

Functions

func Check

func Check(connectionFilePath string, secretKeyFilePath string, configFilePath string) (bool, error)

Check function checks the command line flags for specific actions. Returns true if process should continue, false if it should exit.

func CleanSSHFile

func CleanSSHFile(value *bool, connectionFilePath string, secretKeyFilePath string)

func FlagException

func FlagException(err error) error

func SaveConfig

func SaveConfig(configFilePath string, config SSHManagerConfig) error

SaveConfig saves the configuration to the specified file.

func SetConfig

func SetConfig(configFilePath string, configName string, configValue string) error

SetConfig sets a configuration value in the specified configuration file. Config file is a yaml file that contains various settings for the SSHManager application.

Types

type SSHManagerConfig

type SSHManagerConfig struct {
	Behaviour struct {
		ContinueAfterSSHExit bool `yaml:"continueAfterSSHExit"`
	}
}

func LoadConfig

func LoadConfig(configFilePath string) (SSHManagerConfig, error)

LoadConfig loads the configuration from the specified file.

func (*SSHManagerConfig) SetDefault

func (config *SSHManagerConfig) SetDefault()

Jump to

Keyboard shortcuts

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