diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/config.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/config/config.go b/config/config.go index b1169e7..21076b1 100644 --- a/config/config.go +++ b/config/config.go @@ -26,7 +26,9 @@ const ( ) // Config manages configuration parameters. -type Config struct{} +type Config struct { + IsHTTPS bool +} // Get returns a config parameter value. func (c *Config) Get(key, fallback string) string { @@ -51,5 +53,5 @@ func (c *Config) GetInt(key string, fallback int) int { // NewConfig returns a new Config. func NewConfig() *Config { - return &Config{} + return &Config{IsHTTPS: os.Getenv("HTTPS") != ""} } |