Mercurial > gemma
comparison pkg/models/intservices.go @ 876:8b9bd9ccdd93 geo-style
Upload style during boot. TODO: Connect with layer.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Sun, 30 Sep 2018 19:42:16 +0200 |
parents | ad9272460ef3 |
children | 254cd247826d |
comparison
equal
deleted
inserted
replaced
875:371c756f0370 | 876:8b9bd9ccdd93 |
---|---|
153 | 153 |
154 func IntAnd(a, b func(IntEntry) bool) func(IntEntry) bool { | 154 func IntAnd(a, b func(IntEntry) bool) func(IntEntry) bool { |
155 return func(entry IntEntry) bool { return a(entry) && b(entry) } | 155 return func(entry IntEntry) bool { return a(entry) && b(entry) } |
156 } | 156 } |
157 | 157 |
158 func IntWithStyle(entry IntEntry) bool { | |
159 return entry.Style.Valid | |
160 } | |
161 | |
158 func (ps *IntServices) Filter(accept func(IntEntry) bool) []IntEntry { | 162 func (ps *IntServices) Filter(accept func(IntEntry) bool) []IntEntry { |
159 ps.mu.Lock() | 163 ps.mu.Lock() |
160 defer ps.mu.Unlock() | 164 defer ps.mu.Unlock() |
161 if ps.entries == nil { | 165 if ps.entries == nil { |
162 if err := ps.load(); err != nil { | 166 if err := ps.load(); err != nil { |