File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -359,6 +359,12 @@ type Configuration struct {
359359// This function does not modify the currently stored global configuration.
360360func NewAtPath (path string ) (* Configuration , error ) {
361361 var c Configuration
362+ // Configures the default values for many of the configuration options present
363+ // in the structs. Values set in the configuration file take priority over the
364+ // default values.
365+ if err := defaults .Set (& c ); err != nil {
366+ return nil , err
367+ }
362368 // Track the location where we created this configuration.
363369 c .path = path
364370 return & c , nil
@@ -570,13 +576,6 @@ func FromFile(path string) error {
570576 return err
571577 }
572578
573- // Configures the default values for many of the configuration options present
574- // in the structs. Values set in the configuration file will not be overridden by the
575- // default values.
576- if err := defaults .Set (c ); err != nil {
577- return err
578- }
579-
580579 c .Token = Token {
581580 ID : os .Getenv ("WINGS_TOKEN_ID" ),
582581 Token : os .Getenv ("WINGS_TOKEN" ),
You can’t perform that action at this time.
0 commit comments