Display config on operator start up

This commit is contained in:
Murat Kabilov
2017-05-12 11:41:30 +02:00
parent a97dfb07de
commit 310c119dfa
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -3,6 +3,7 @@ package config
import (
"fmt"
"time"
"encoding/json"
"github.com/kelseyhightower/envconfig"
)
@@ -49,3 +50,12 @@ func LoadFromEnv() *Config {
return &cfg
}
func (c Config) MustMarshal() string {
b, err := json.MarshalIndent(c, "", "\t")
if err != nil {
panic(err)
}
return string(b)
}