aboutsummaryrefslogtreecommitdiff
path: root/internal/yaml
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-22 23:40:53 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-22 23:40:53 +0200
commit9280ecb7e0b0039d6c1f4800373eb76452145078 (patch)
treee3dd11e9953f949709505731a16e8246afe536aa /internal/yaml
parent15b6c155a8476cf86e8bd745e239e55e77317909 (diff)
downloadfeed2imap-go-9280ecb7e0b0039d6c1f4800373eb76452145078.tar.gz
feed2imap-go-9280ecb7e0b0039d6c1f4800373eb76452145078.tar.bz2
feed2imap-go-9280ecb7e0b0039d6c1f4800373eb76452145078.zip
Concurrent feed processing; central imap handler
Diffstat (limited to 'internal/yaml')
-rw-r--r--internal/yaml/yaml.go10
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
an class='deletions'>-1/+5 2014-04-18Specify variable gpg.Jason A. Donenfeld1-1/+1 2014-04-18style: don't escape new line on &&Jason A. Donenfeld1-2/+2 2014-04-18reencryption: remove temporary file on failureJason A. Donenfeld1-1/+1 2014-04-18reencryption: only reencrypt files when requiredJason A. Donenfeld2-16/+37 2014-04-17cp: typo as cvJason A. Donenfeld1-1/+1 2014-04-17bash: gpg_id is localJason A. Donenfeld1-0/+1 2014-04-17move/copy: always reencrypt passwords at destinationJason A. Donenfeld5-25/+56 2014-04-17makefile: allow platform files with gnu sedJason A. Donenfeld1-7/+8 2014-04-17mv: Add pass mv/rename supportJason A. Donenfeld5-3/+78 2014-04-17revelation2pass: add plain XML importJavali1-11/+15 2014-04-17platform: add cygwin supportJason A. Donenfeld2-1/+17 > 2006-12-14Add simple pager to log pageLars Hjemli4-6/+37 2006-12-13Add separate makefile-rule to clear current cacheLars Hjemli1-2/+4 2006-12-13Remove implementation details from READMELars Hjemli1-53/+34 2006-12-13Small layout adjustments to summary and blob viewLars Hjemli3-5/+13 2006-12-13Add display of tree content w/ui-tree.cLars Hjemli9-8/+113 2006-12-12cache_lock: do xstrdup/free on lockfileLars Hjemli1-1/+2 2006-12-11Don't truncate valid cachefilesLars Hjemli3-4/+16 2006-12-11Move global variables + callback functions into shared.cLars Hjemli4-82/+86 2006-12-11Move functions for generic object output into ui-view.cLars Hjemli4-34/+43 2006-12-11Move log-functions into ui-log.cLars Hjemli5-111/+121 2006-12-11Move repo summary functions into ui-summary.cLars Hjemli4-47/+59 2006-12-11Move functions for repolist output into ui-repolist.cLars Hjemli5-70/+90 2006-12-11Move common output-functions into ui-shared.cLars Hjemli4-82/+99 2006-12-11Rename config.c to parsing.c + move cgit_parse_query from cgit.c to parsing.cLars Hjemli4-28/+29 2006-12-11Avoid infinite loops in caching layerLars Hjemli3-14/+31 2006-12-11Let 'make install' clear all cachefilesLars Hjemli1-0/+2 2006-12-11Fix cache algorithm loopholeLars Hjemli3-11/+16 2006-12-10Add version identifier in generated filesLars Hjemli2-9/+14 2006-12-10Add license file and copyright noticesLars Hjemli5-0/+372 2006-12-10Add caching infrastructureLars Hjemli9-28/+353