Allow for optional external viewer args
In order to pass in options like `--new-window` to an external viewer like `firefox`, optional args can now be defined in configuration. See config-example.yaml for an example.
This commit is contained in:
@@ -13,8 +13,9 @@ import (
|
||||
|
||||
// Configuration stores the global config
|
||||
type Configuration struct {
|
||||
Feeds []string `yaml:"feeds"`
|
||||
ExternalViewer string `yaml:"externalViewer,omitempty"`
|
||||
Feeds []string `yaml:"feeds"`
|
||||
ExternalViewer string `yaml:"externalViewer,omitempty"`
|
||||
ExternalViewerArgs []string `yaml:"externalViewerArgs,omitempty"`
|
||||
}
|
||||
|
||||
// DefaultConfiguration can be used if a config is missing
|
||||
@@ -22,6 +23,7 @@ var DefaultConfiguration = Configuration{
|
||||
Feeds: []string{
|
||||
"https://news.ycombinator.com/rss",
|
||||
"https://www.reddit.com/r/golang/.rss",
|
||||
"https://www.reddit.com/r/linux/.rss",
|
||||
"https://www.zdnet.com/topic/security/rss.xml",
|
||||
},
|
||||
}
|
||||
|
@@ -15,8 +15,6 @@ func TestLoadConfiguration(t *testing.T) {
|
||||
"https://www.reddit.com/r/golang/.rss",
|
||||
"https://www.reddit.com/r/linux/.rss",
|
||||
"https://www.zdnet.com/topic/security/rss.xml",
|
||||
"https://aws.amazon.com/blogs/security/feed/",
|
||||
"https://www.archlinux.org/feeds/news/",
|
||||
}
|
||||
|
||||
assert.Equal(
|
||||
|
Reference in New Issue
Block a user