Skip to content

Commit a801271

Browse files
committed
Run go fmt
1 parent 0a392f5 commit a801271

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

template.go

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ func whereExist(entries []*RuntimeContainer, key string) []*RuntimeContainer {
9292
// selects entries where a key does not exist
9393
func whereNotExist(entries []*RuntimeContainer, key string) []*RuntimeContainer {
9494
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
102102
}
103103

104104
// 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 {
286286
func generateFile(config Config, containers Context) bool {
287287
templatePath := config.Template
288288
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,
315315
}).ParseFiles(templatePath)
316316
if err != nil {
317317
log.Fatalf("unable to parse template: %s", err)

0 commit comments

Comments
 (0)