From 977c8509c6db4fd04e547ffa3e6e49c1927b31bd Mon Sep 17 00:00:00 2001 From: Wolfy-J Date: Sat, 28 Jul 2018 16:41:25 +0300 Subject: Update service.go --- service/env/service.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'service/env') 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 -- cgit v1.2.3