aboutsummaryrefslogtreecommitdiff
path: root/internal/config/yaml.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--internal/config/yaml.go21
1 files changed, 11 insertions, 10 deletions
diff --git a/internal/config/yaml.go b/internal/config/yaml.go
index 8c40107..80fb383 100644
--- a/internal/config/yaml.go
+++ b/internal/config/yaml.go
@@ -27,7 +27,7 @@ func (grpFeed *configGroupFeed) isGroup() bool {
}
func (grpFeed *configGroupFeed) isFeed() bool {
- return grpFeed.Feed != Feed{}
+ return grpFeed.Feed.Name != "" || grpFeed.Feed.Url != ""
}
func (grpFeed *configGroupFeed) target() string {
@@ -51,20 +51,21 @@ func parse(buf []byte) (config, error) {
return parsedCfg, nil
}
-func appTarget(target, app string) string {
- if target == "" {
- return app
- }
-
- if app == "" {
+func appTarget(target []string, app string) []string {
+ switch {
+ case len(target) == 0 && app == "":
+ return []string{}
+ case len(target) == 0:
+ return []string{app}
+ case app == "":
return target
+ default:
+ return append(target, app)
}
-
- return target + "." + app
}
// Parse the group structure and populate the `Target` fields in the feeds
-func buildFeeds(cfg []configGroupFeed, target string, feeds Feeds) error {
+func buildFeeds(cfg []configGroupFeed, target []string, feeds Feeds) error {
for idx := range cfg {
f := &cfg[idx] // cannot use `_, f := range cfg` as it returns copies(!), but we need the originals
target := appTarget(target, f.target())
s.git/commit/.gitconfig?id=df3586b1f5ccafb50677fcc5700ccc501e35e48f&follow=1'>necoro.eu -> necoro.devRené 'Necoro' Neumann1-2/+3 2020-05-27Go Path SupportRené 'Necoro' Neumann1-0/+2 2020-05-27[vim] syntastic configRené 'Necoro' Neumann1-0/+3 2020-05-27Remove vim-latex configsRené 'Necoro' Neumann2-24/+0 2020-04-15Simplify check_libsRené 'Necoro' Neumann1-6/+2 2020-04-15Explicitly set PAGERRené 'Necoro' Neumann1-0/+1 2020-04-12[vim] Syntax coloring by default, if supportedRené 'Necoro' Neumann1-0/+4 2020-04-12Fix scrolling in screenRené 'Necoro' Neumann1-0/+4 2020-04-11UpdateRené 'Necoro' Neumann1-0/+0 2020-04-05Replace git:// by https://René 'Necoro' Neumann1-2/+2 2020-02-17Update urxvt extension configRené 'Necoro' Neumann2-4/+120 2020-02-17Remove urxvt wgetpaste extensionRené 'Necoro' Neumann2-30/+1 2020-02-17[i3] Wifi: Include frequenceRené 'Necoro' Neumann1-1/+1 2020-02-17Put ssh-agent into the i3 environment.René 'Necoro' Neumann1-0/+1 2020-02-17Update cci: stgit now uses python3René 'Necoro' Neumann1-1/+1 2020-02-17Revert "Local Changes"René 'Necoro' Neumann2-5/+3 This reverts commit 2fe2c79f5a84c7c6dc7a752132e5dfcbb5e47dd7. 2020-02-17Update vundleRené 'Necoro' Neumann1-0/+0 2020-02-17Enable secondary screen in urxvtRené 'Necoro' Neumann1-0/+1 2020-02-17Local ChangesRené 'Necoro' Neumann2-3/+5 2018-06-10[i3] Replace icons by font awesomeRené 'Necoro' Neumann24-149/+13 2018-06-10[i3] Remove obsolete pidgin stuffRené 'Necoro' Neumann2-36/+0 2018-06-10[zsh] Remove obsolete isabelle functionsRené 'Necoro' Neumann2-112/+0 2018-06-10Misc changesRené 'Necoro' Neumann3-0/+7 2018-06-10[git] Update email addressRené 'Necoro' Neumann1-1/+1 2018-06-10Enhance cci scriptRené 'Necoro' Neumann1-15/+12 2017-11-18Some windows setupRené 'Necoro' Neumann2-1/+6 2017-10-08[zsh] Use zcalc instead of bcRené 'Necoro' Neumann1-5/+4 2017-10-08[zsh] CalculatorRené 'Necoro' Neumann1-0/+8 2017-10-08Some vim changes.René 'Necoro' Neumann4-28/+17 2017-10-08Delete old stuff.René 'Necoro' Neumann5-71/+1