@@ -92,13 +92,13 @@ func whereExist(entries []*RuntimeContainer, key string) []*RuntimeContainer {
92
92
// selects entries where a key does not exist
93
93
func whereNotExist (entries []* RuntimeContainer , key string ) []* RuntimeContainer {
94
94
selection := []* RuntimeContainer {}
95
- for _ , v := range entries {
96
- value := deepGet (* v , key )
97
- if value == nil {
98
- selection = append (selection , v )
99
- }
100
- }
101
- return selection
95
+ for _ , v := range entries {
96
+ value := deepGet (* v , key )
97
+ if value == nil {
98
+ selection = append (selection , v )
99
+ }
100
+ }
101
+ return selection
102
102
}
103
103
104
104
// selects entries based on key. Assumes key is delimited and breaks it apart before comparing
@@ -286,32 +286,32 @@ func trimSuffix(suffix, s string) string {
286
286
func generateFile (config Config , containers Context ) bool {
287
287
templatePath := config .Template
288
288
tmpl , err := template .New (filepath .Base (templatePath )).Funcs (template.FuncMap {
289
- "closest" : arrayClosest ,
290
- "coalesce" : coalesce ,
291
- "contains" : contains ,
292
- "dict" : dict ,
293
- "dir" : dirList ,
294
- "exists" : exists ,
295
- "first" : arrayFirst ,
296
- "groupBy" : groupBy ,
297
- "groupByKeys" : groupByKeys ,
298
- "groupByMulti" : groupByMulti ,
299
- "hasPrefix" : hasPrefix ,
300
- "hasSuffix" : hasSuffix ,
301
- "json" : marshalJson ,
302
- "intersect" : intersect ,
303
- "keys" : keys ,
304
- "last" : arrayLast ,
305
- "replace" : strings .Replace ,
306
- "sha1" : hashSha1 ,
307
- "split" : strings .Split ,
308
- "trimPrefix" : trimPrefix ,
309
- "trimSuffix" : trimSuffix ,
310
- "where" : where ,
311
- "whereExist" : whereExist ,
312
- "whereNotExist" : whereNotExist ,
313
- "whereAny" : whereAny ,
314
- "whereAll" : whereAll ,
289
+ "closest" : arrayClosest ,
290
+ "coalesce" : coalesce ,
291
+ "contains" : contains ,
292
+ "dict" : dict ,
293
+ "dir" : dirList ,
294
+ "exists" : exists ,
295
+ "first" : arrayFirst ,
296
+ "groupBy" : groupBy ,
297
+ "groupByKeys" : groupByKeys ,
298
+ "groupByMulti" : groupByMulti ,
299
+ "hasPrefix" : hasPrefix ,
300
+ "hasSuffix" : hasSuffix ,
301
+ "json" : marshalJson ,
302
+ "intersect" : intersect ,
303
+ "keys" : keys ,
304
+ "last" : arrayLast ,
305
+ "replace" : strings .Replace ,
306
+ "sha1" : hashSha1 ,
307
+ "split" : strings .Split ,
308
+ "trimPrefix" : trimPrefix ,
309
+ "trimSuffix" : trimSuffix ,
310
+ "where" : where ,
311
+ "whereExist" : whereExist ,
312
+ "whereNotExist" : whereNotExist ,
313
+ "whereAny" : whereAny ,
314
+ "whereAll" : whereAll ,
315
315
}).ParseFiles (templatePath )
316
316
if err != nil {
317
317
log .Fatalf ("unable to parse template: %s" , err )
0 commit comments