Load loads the config. Error is only returned if the config file exists but could not be loaded. No error is returned if the config file does not exist.
()
| 105 | // Error is only returned if the config file exists but could not be loaded. |
| 106 | // No error is returned if the config file does not exist. |
| 107 | func Load() (c config.Config, err error) { |
| 108 | f := config.CurrentProfile().File() |
| 109 | if _, err := os.Stat(f); err != nil { |
| 110 | return c, nil |
| 111 | } |
| 112 | |
| 113 | return LoadFrom(f) |
| 114 | } |
| 115 | |
| 116 | // LoadInstance is like Load but returns the config of the currently running instance. |
| 117 | func LoadInstance() (config.Config, error) { |
no test coverage detected