From 19d88fc879ba403347726138eb532fb85d38168e Mon Sep 17 00:00:00 2001 From: Wolfy-J Date: Sun, 23 Sep 2018 14:52:55 +0300 Subject: default configs --- service/env/config.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'service/env') diff --git a/service/env/config.go b/service/env/config.go index d0ba686b..a7da695e 100644 --- a/service/env/config.go +++ b/service/env/config.go @@ -14,3 +14,9 @@ type Config struct { func (c *Config) Hydrate(cfg service.Config) error { return cfg.Unmarshal(&c.Values) } + +// InitDefaults allows to init blank config with pre-defined set of default values. +func (c *Config) InitDefaults() error { + c.Values = make(map[string]string) + return nil +} -- cgit v1.2.3