feat: Save api/wss urls into the configuration
@@ -24,6 +24,8 @@ type Config struct {
Org string `mapstructure:"org"`
User string `mapstructure:"user"`
Password string `mapstructure:"pass"`
+ API string `mapstructure:"api"`
+ WSS string `mapstructure:"wss"`
Certs string `mapstructure:"certs"`
Colors bool `mapstructure:"colors"`
@@ -50,6 +52,8 @@ func Load() (*Config, error) {
// Use empty defaults in viper to allow NeededOptions defaults to apply
v.SetDefault("user", "")
v.SetDefault("pass", "")
+ v.SetDefault("api", "")
+ v.SetDefault("wss", "")
v.SetDefault("certs", "")
v.SetDefault("colors", true)
@@ -110,6 +114,8 @@ func (c *Config) Save() error {
c.v.Set("org", c.Org)
c.v.Set("user", c.User)
c.v.Set("pass", c.Password)
+ c.v.Set("api", c.API)
+ c.v.Set("wss", c.WSS)
c.v.Set("certs", c.Certs)
c.v.Set("colors", c.Colors)
