package config import ( "errors" "github.com/spf13/pflag" ) // Flags contains command-line options accepted by est. type Flags struct { ConfigPath string } // ParseFlags parses est command-line flags. func ParseFlags() (*Flags, error) { configPath := pflag.StringP("config", "c", "./config.toml", "toml config path") pflag.Parse() if configPath == nil { return nil, errors.New("no config path") } return &Flags{ConfigPath: *configPath}, nil }