TryLoadFile attempts to load the configuration file from specified path on the file system.
(file string)
| 329 | |
| 330 | // TryLoadFile attempts to load the configuration file from specified path on the file system. |
| 331 | func (c *Config) TryLoadFile(file string) error { |
| 332 | c.viper.SetConfigFile(file) |
| 333 | return c.viper.ReadInConfig() |
| 334 | } |
| 335 | |
| 336 | // Validate ensures that all configuration options provided by user have the expected values. It returns |
| 337 | // a list of validation errors prefixed with the offending configuration property/flag. |
no outgoing calls