summaryrefslogtreecommitdiff
path: root/service/env/service.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-01-05 12:21:37 +0300
committerWolfy-J <[email protected]>2019-01-05 12:21:37 +0300
commit46009112a783a1fdae95e0a061d4c8c41a1c8ff1 (patch)
treea34cf8ad465e9f354723f855c531ea1db3235cbd /service/env/service.go
parentd5e5be00aca87ea39ece9c04efe7dc354b1dc3f6 (diff)
first set of patches
Diffstat (limited to 'service/env/service.go')
-rw-r--r--service/env/service.go14
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
+}