mirror of
https://github.com/aditya-K2/gspt.git
synced 2026-01-07 21:13:50 -05:00
34 lines
769 B
Go
34 lines
769 B
Go
package config
|
|
|
|
import (
|
|
"flag"
|
|
)
|
|
|
|
var (
|
|
Flags = &Flag{}
|
|
)
|
|
|
|
type Flag struct {
|
|
ConfigPath string
|
|
Version bool
|
|
Image string
|
|
Corners string
|
|
UseIcons bool
|
|
}
|
|
|
|
func parseFlags() {
|
|
flag.BoolVar(&Flags.Version, "v", false,
|
|
"Output version information and exit")
|
|
flag.BoolVar(&Flags.Version, "version", false,
|
|
"Output version information and exit")
|
|
flag.BoolVar(&Flags.UseIcons, "icons", Config.UseIcons,
|
|
"Use Icons")
|
|
flag.StringVar(&Flags.ConfigPath, "c", userConfigPath,
|
|
"Specify The Directory to check for config.yml file.")
|
|
flag.StringVar(&Flags.Image, "image", "",
|
|
"Show or Hide Image ( 'show' | 'hidden' )")
|
|
flag.StringVar(&Flags.Corners, "corners", "",
|
|
"Enable or disable Rounded Corners ( 'rounded' | 'default' )")
|
|
flag.Parse()
|
|
}
|