mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 15:29:56 +02:00
Display config on operator start up
This commit is contained in:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user