summaryrefslogtreecommitdiff
path: root/service/env
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-07-28 16:41:25 +0300
committerGitHub <[email protected]>2018-07-28 16:41:25 +0300
commit977c8509c6db4fd04e547ffa3e6e49c1927b31bd (patch)
tree9505fe264710d50f0fa5930003bcf8ee7d1abb32 /service/env
parent48705551e5ad9fad88c33d2260c295bce5cfd3e7 (diff)
Update service.go
Diffstat (limited to 'service/env')
-rw-r--r--service/env/service.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/service/env/service.go b/service/env/service.go
index 9fb110c3..0822d55a 100644
--- a/service/env/service.go
+++ b/service/env/service.go
@@ -10,8 +10,13 @@ type Service struct {
}
// NewService creates new env service instance for given rr version.
-func NewService(version string) *Service {
- return &Service{values: map[string]string{"rr": version}}
+func NewService(defaults map[string]string) *Service {
+ s := &Service{values: defaults}
+ if s.values == nil {
+ s.values = make(map[string]string)
+ }
+
+ return s
}
// Init must return configure svc and return true if svc hasStatus enabled. Must return error in case of