diff options
Diffstat (limited to 'internal/yaml')
-rw-r--r-- | internal/yaml/yaml.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/yaml/yaml.go b/internal/yaml/yaml.go index 207adab..9dc2615 100644 --- a/internal/yaml/yaml.go +++ b/internal/yaml/yaml.go @@ -111,24 +111,24 @@ func buildFeeds(cfg []configGroupFeed, target []string, feeds F.Feeds) error { return nil } -func Load(path string) (C.Config, F.Feeds, error) { +func Load(path string) (*C.Config, F.Feeds, error) { buf, err := ioutil.ReadFile(path) if err != nil { - return C.Config{}, nil, fmt.Errorf("while reading '%s': %w", path, err) + return nil, nil, fmt.Errorf("while reading '%s': %w", path, err) } var parsedCfg config if parsedCfg, err = parse(buf); err != nil { - return C.Config{}, nil, err + return nil, nil, err } feeds := F.Feeds{} if err := buildFeeds(parsedCfg.Feeds, []string{}, feeds); err != nil { - return C.Config{}, nil, fmt.Errorf("while parsing: %w", err) + return nil, nil, fmt.Errorf("while parsing: %w", err) } - return C.Config{ + return &C.Config{ GlobalOptions: parsedCfg.GlobalOptions, GlobalConfig: parsedCfg.GlobalConfig, }, feeds, nil |