diff options
author | Wolfy-J <[email protected]> | 2019-01-05 12:21:37 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-01-05 12:21:37 +0300 |
commit | 46009112a783a1fdae95e0a061d4c8c41a1c8ff1 (patch) | |
tree | a34cf8ad465e9f354723f855c531ea1db3235cbd /service/env/service.go | |
parent | d5e5be00aca87ea39ece9c04efe7dc354b1dc3f6 (diff) |
first set of patches
Diffstat (limited to 'service/env/service.go')
-rw-r--r-- | service/env/service.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/service/env/service.go b/service/env/service.go index 4d1327d4..83175b36 100644 --- a/service/env/service.go +++ b/service/env/service.go @@ -39,3 +39,17 @@ func (s *Service) GetEnv() (map[string]string, error) { func (s *Service) SetEnv(key, value string) { s.values[key] = value } + +// Copy all environment values. +func (s *Service) Copy(setter Setter) error { + values, err := s.GetEnv() + if err != nil { + return err + } + + for k, v := range values { + setter.SetEnv(k, v) + } + + return nil +} |