Skip to content

Commit 1820768

Browse files
committed
cleanup
1 parent e75f327 commit 1820768

File tree

1 file changed

+28
-27
lines changed

1 file changed

+28
-27
lines changed

internal/templatex/functions.go

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -29,29 +29,32 @@ import (
2929
// template FuncMap generator
3030
func FuncMap() template.FuncMap {
3131
return template.FuncMap{
32-
"toYaml": toYaml,
33-
"mustToYaml": toYaml,
34-
"fromYaml": fromYaml,
35-
"fromYamlArray": fromYamlArray,
36-
"mustFromYaml": fromYaml,
37-
"toJson": toJson,
38-
"mustToJson": toJson,
39-
"toPrettyJson": toPrettyJson,
40-
"mustToPrettyJson": toPrettyJson,
41-
"toRawJson": toRawJson,
42-
"mustToRawJson": toRawJson,
43-
"fromJson": fromJson,
44-
"mustFromJson": fromJson,
45-
"fromJsonArray": fromJsonArray,
46-
"mustFromJsonArray": fromJsonArray,
47-
"required": required,
48-
"bitwiseShiftLeft": bitwiseShiftLeft,
49-
"bitwiseShiftRight": bitwiseShiftRight,
50-
"bitwiseAnd": bitwiseAnd,
51-
"bitwiseOr": bitwiseOr,
52-
"bitwiseXor": bitwiseXor,
53-
"parseIPv4Address": parseIPv4Address,
54-
"formatIPv4Address": formatIPv4Address,
32+
"toYaml": toYaml,
33+
"mustToYaml": toYaml,
34+
"fromYaml": fromYaml,
35+
"mustFromYaml": fromYaml,
36+
"fromYamlArray": fromYamlArray,
37+
"mustFromYamlArray": fromYamlArray,
38+
"toJson": toJson,
39+
"mustToJson": toJson,
40+
"toPrettyJson": toPrettyJson,
41+
"mustToPrettyJson": toPrettyJson,
42+
"toRawJson": toRawJson,
43+
"mustToRawJson": toRawJson,
44+
"fromJson": fromJson,
45+
"mustFromJson": fromJson,
46+
"fromJsonArray": fromJsonArray,
47+
"mustFromJsonArray": fromJsonArray,
48+
"required": required,
49+
"bitwiseShiftLeft": bitwiseShiftLeft,
50+
"bitwiseShiftRight": bitwiseShiftRight,
51+
"bitwiseAnd": bitwiseAnd,
52+
"bitwiseOr": bitwiseOr,
53+
"bitwiseXor": bitwiseXor,
54+
"parseIPv4Address": parseIPv4Address,
55+
"formatIPv4Address": formatIPv4Address,
56+
"lookupWithKubeConfig": makeFuncLookupWithKubeConfig(true),
57+
"mustLookupWithKubeConfig": makeFuncLookupWithKubeConfig(false),
5558
}
5659
}
5760

@@ -66,10 +69,8 @@ func FuncMapForTemplate(t *template.Template) template.FuncMap {
6669
// template FuncMap generator for functions called in target Kubernetes context
6770
func FuncMapForClient(c client.Client) template.FuncMap {
6871
return template.FuncMap{
69-
"lookup": makeFuncLookup(c, true),
70-
"mustLookup": makeFuncLookup(c, false),
71-
"lookupWithKubeConfig": makeFuncLookupWithKubeConfig(true),
72-
"mustLookupWithKubeConfig": makeFuncLookupWithKubeConfig(false),
72+
"lookup": makeFuncLookup(c, true),
73+
"mustLookup": makeFuncLookup(c, false),
7374
}
7475
}
7576

0 commit comments

Comments
 (0)