You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// LoadFromViperAndSystem is the same as `LoadFromViper` but also fetches values from system's [keyring service](https://github.com/zalando/go-keyring).
// 6) default values (set via flag default values, or calls to `SetDefault` or via `defaultConfiguration` argument provided)
60
72
// Nonetheless, when it comes to default values. It differs slightly from Viper as default values from the default Configuration (i.e. `defaultConfiguration` argument provided) will take precedence over defaults set via `SetDefault` or flags unless they are considered empty values according to `reflection.IsEmpty`.
// LoadFromEnvironmentAndSystem is the same as `LoadFromEnvironment` but also gives the ability to load the configuration from system's [keyring service](https://github.com/zalando/go-keyring).
78
+
// Important note:
79
+
// Viper's precedence order is mostly maintained:
80
+
// 1) values defined in keyring (if not empty and keyring is selected - this is the only difference from Viper)
81
+
// 2) values set using explicit calls to `Set`
82
+
// 3) flags
83
+
// 4) environment (variables or `.env`)
84
+
// 5) configuration file
85
+
// 6) key/value store
86
+
// 7) default values (set via flag default values, or calls to `SetDefault` or via `defaultConfiguration` argument provided)
87
+
// Nonetheless, when it comes to default values. It differs slightly from Viper as default values from the default Configuration (i.e. `defaultConfiguration` argument provided) will take precedence over defaults set via `SetDefault` or flags unless they are considered empty values according to `reflection.IsEmpty`.
0 commit comments