diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/config.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go index bc4fc60..2e08434 100644 --- a/config/config.go +++ b/config/config.go @@ -197,6 +197,11 @@ func (c *Config) CreateAdmin() bool { return c.get("CREATE_ADMIN", "") != "" } +// PocketConsumerKey returns the Pocket Consumer Key if defined as environment variable. +func (c *Config) PocketConsumerKey(defaultValue string) string { + return c.get("POCKET_CONSUMER_KEY", defaultValue) +} + // NewConfig returns a new Config. func NewConfig() *Config { return &Config{IsHTTPS: os.Getenv("HTTPS") != ""} |