Mercurial > gemma
diff pkg/models/intservices.go @ 913:876d1f5433be geo-style
Started with direct applying style after modification via controller. WIP.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Tue, 02 Oct 2018 23:29:55 +0200 |
parents | 254cd247826d |
children | 2ebf677fc2e1 |
line wrap: on
line diff
--- a/pkg/models/intservices.go Tue Oct 02 22:25:44 2018 +0200 +++ b/pkg/models/intservices.go Tue Oct 02 23:29:55 2018 +0200 @@ -121,8 +121,15 @@ return func(entry IntEntry) bool { return entry.Name == name } } -func IntAnd(a, b func(IntEntry) bool) func(IntEntry) bool { - return func(entry IntEntry) bool { return a(entry) && b(entry) } +func IntAnd(accept ...func(IntEntry) bool) func(IntEntry) bool { + return func(entry IntEntry) bool { + for _, a := range accept { + if !a(entry) { + return false + } + } + return true + } } func IntWithStyle(entry IntEntry) bool {