diff options
author | Wolfy-J <[email protected]> | 2018-09-07 23:26:26 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-09-07 23:26:26 +0300 |
commit | cac8bf48bab69ff3468cf7d30ac1c18904885a47 (patch) | |
tree | 5ffec205a9b51a933339d535de198a267be0275a /service/env/service.go | |
parent | ea97c188a4a74c00b585cb50fa1ed4db7d190e09 (diff) |
added ability to alter env values
Diffstat (limited to 'service/env/service.go')
-rw-r--r-- | service/env/service.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/service/env/service.go b/service/env/service.go index 0822d55a..b32a2f2b 100644 --- a/service/env/service.go +++ b/service/env/service.go @@ -15,7 +15,7 @@ func NewService(defaults map[string]string) *Service { if s.values == nil { s.values = make(map[string]string) } - + return s } @@ -33,3 +33,8 @@ func (s *Service) Init(cfg *Config) (bool, error) { func (s *Service) GetEnv() (map[string]string, error) { return s.values, nil } + +// SetEnv sets or creates environment value. +func (s *Service) SetEnv(key, value string) { + s.values[key] = value +} |