Files
gspt/config/flags.go
2024-01-24 16:33:52 +05:30

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()
}