()
| 255 | } |
| 256 | |
| 257 | func Fetch() (*Configuration, error) { |
| 258 | config := ConfigStore.Load() |
| 259 | c, ok := config.(*Configuration) |
| 260 | if !ok { |
| 261 | return nil, errors.New("config not loaded from file: create a JSON file called ledgerforge.json with your config") |
| 262 | } |
| 263 | return c, nil |
| 264 | } |
| 265 | |
| 266 | func (cnf *Configuration) validateAndAddDefaults() error { |
| 267 | if err := cnf.validateRequiredFields(); err != nil { |
no outgoing calls