Documentation ¶
Index ¶
Constants ¶
View Source
const ConfigPath = ".config/srv/config.yml"
ConfigPath defines where the configuration is stored
Variables ¶
View Source
var DefaultConfiguration = Configuration{ Feeds: []string{ "https://aws.amazon.com/blogs/security/feed/", "https://www.phoronix.com/rss.php", "https://www.zdnet.com/topic/security/rss.xml", }, }
DefaultConfiguration can be used if a config is missing
Functions ¶
func DetermineExternalViewer ¶
DetermineExternalViewer checks the OS to decide the default viewer
func EnsureConfigDirExists ¶
EnsureConfigDirExists ensures directory exists with correct permissions
func GetUserConfigPath ¶
GetUGetUGetUserConfigPath returns the full configuration path for the current user
func WriteConfig ¶
func WriteConfig(config Configuration, f string) error
WriteConfig writes a config to disk
Types ¶
type Configuration ¶
type Configuration struct { Feeds []string `yaml:"feeds"` ExternalViewer string `yaml:"externalViewer,omitempty"` ExternalViewerArgs []string `yaml:"externalViewerArgs,omitempty"` }
Configuration stores the global config
func LoadConfiguration ¶
func LoadConfiguration(f string) (Configuration, error)
LoadConfiguration loads a configuration from a file
Click to show internal directories.
Click to hide internal directories.