Documentation
¶
Overview ¶
Example ¶
Example tests if help is is parsed properly
// Save the original osExit origExit := osExit defer func() { osExit = origExit }() // Override with a fake exit // var exitCode int osExit = func(code int) { _ = code } // Save the original arguments origArgs := os.Args defer func() { os.Args = origArgs }() // Override with our input os.Args = []string{"gorilla.exe", "--help"} // Run code, ignoring the return values _, _, _ = parseArguments()
Output: unknown unknown Gorilla - Munki-like Application Management for Windows https://github.com/1dustindavis/gorilla Usage: gorilla.exe [options] Options: -c, -config path to configuration file in yaml format -v, -verbose enable verbose output -d, -debug enable debug output -a, -about displays the version number and other build info -V, -version display the version number -h, -help display this help message
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // CachePath is a directory we will use for temporary storage CachePath string )
Functions ¶
Types ¶
type Object ¶
type Object struct { URL string `yaml:"url"` URLPackages string `yaml:"url_packages"` Manifest string `yaml:"manifest"` Catalogs []string `yaml:"catalogs"` AppDataPath string `yaml:"app_data_path"` Verbose bool `yaml:"verbose,omitempty"` Debug bool `yaml:"debug,omitempty"` AuthUser string `yaml:"auth_user,omitempty"` AuthPass string `yaml:"auth_pass,omitempty"` TLSAuth bool `yaml:"tls_auth,omitempty"` TLSClientCert string `yaml:"tls_client_cert,omitempty"` TLSClientKey string `yaml:"tls_client_key,omitempty"` TLSServerCert string `yaml:"tls_server_cert,omitempty"` }
Object to store our configuration
var Current Object
Current is a global struct to store our configuration in
Click to show internal directories.
Click to hide internal directories.