aboutsummaryrefslogtreecommitdiffhomepage
path: root/config
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2018-05-21 12:19:56 -0700
committerGravatar Frédéric Guillot <fred@miniflux.net>2018-05-21 19:58:36 -0400
commitb270159aae97359afe02f3c4843fa0f4e9a1a1b6 (patch)
tree290eef118ce6ccab49471d3673bb7d51b24bb4c2 /config
parent44decae557a6f78eda57b8f407d35b10233538e4 (diff)
Offer the possibility to set Pocket Consumer Key as environment variable
Diffstat (limited to 'config')
-rw-r--r--config/config.go5
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") != ""}