Fix access token validation

The access token was not be validated when there were additional
validations errors with the named colors
This commit is contained in:
Ryan Cavicchioni 2021-03-31 00:13:49 -05:00
parent 9b20413d64
commit ce5f14db5d
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

View File

@ -42,8 +42,9 @@ func GetConfig() *Config {
// Validate configuration struct // Validate configuration struct
func (c *Config) Validate() error { func (c *Config) Validate() error {
var err error var err error
if c.AccessToken == "" { if c.AccessToken == "" {
err = errors.New("access_token is not set") return errors.New("access_token is not set")
} }
if err = c.validateColors(); err != nil { if err = c.validateColors(); err != nil {