From 87f900ce77451a9b5c38a07366d6048a155f71ef Mon Sep 17 00:00:00 2001 From: Justin Chadwell Date: Wed, 5 Apr 2023 11:48:03 +0100 Subject: [PATCH 1/2] chore: sort bake stdlib map Signed-off-by: Justin Chadwell --- bake/hclparser/stdlib.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bake/hclparser/stdlib.go b/bake/hclparser/stdlib.go index f78b6dce..06269846 100644 --- a/bake/hclparser/stdlib.go +++ b/bake/hclparser/stdlib.go @@ -31,21 +31,21 @@ var stdlibFunctions = map[string]function.Function{ "cidrnetmask": cidr.NetmaskFunc, "cidrsubnet": cidr.SubnetFunc, "cidrsubnets": cidr.SubnetsFunc, - "csvdecode": stdlib.CSVDecodeFunc, "coalesce": stdlib.CoalesceFunc, "coalescelist": stdlib.CoalesceListFunc, "compact": stdlib.CompactFunc, "concat": stdlib.ConcatFunc, "contains": stdlib.ContainsFunc, "convert": typeexpr.ConvertFunc, + "csvdecode": stdlib.CSVDecodeFunc, "distinct": stdlib.DistinctFunc, "divide": stdlib.DivideFunc, "element": stdlib.ElementFunc, "equal": stdlib.EqualFunc, "flatten": stdlib.FlattenFunc, "floor": stdlib.FloorFunc, - "formatdate": stdlib.FormatDateFunc, "format": stdlib.FormatFunc, + "formatdate": stdlib.FormatDateFunc, "formatlist": stdlib.FormatListFunc, "greaterthan": stdlib.GreaterThanFunc, "greaterthanorequalto": stdlib.GreaterThanOrEqualToFunc, @@ -53,10 +53,10 @@ var stdlibFunctions = map[string]function.Function{ "indent": stdlib.IndentFunc, "index": stdlib.IndexFunc, "int": stdlib.IntFunc, + "join": stdlib.JoinFunc, "jsondecode": stdlib.JSONDecodeFunc, "jsonencode": stdlib.JSONEncodeFunc, "keys": stdlib.KeysFunc, - "join": stdlib.JoinFunc, "length": stdlib.LengthFunc, "lessthan": stdlib.LessThanFunc, "lessthanorequalto": stdlib.LessThanOrEqualToFunc, @@ -70,15 +70,15 @@ var stdlibFunctions = map[string]function.Function{ "modulo": stdlib.ModuloFunc, "multiply": stdlib.MultiplyFunc, "negate": stdlib.NegateFunc, - "notequal": stdlib.NotEqualFunc, "not": stdlib.NotFunc, + "notequal": stdlib.NotEqualFunc, "or": stdlib.OrFunc, "parseint": stdlib.ParseIntFunc, "pow": stdlib.PowFunc, "range": stdlib.RangeFunc, - "regexall": stdlib.RegexAllFunc, - "regex": stdlib.RegexFunc, "regex_replace": stdlib.RegexReplaceFunc, + "regex": stdlib.RegexFunc, + "regexall": stdlib.RegexAllFunc, "reverse": stdlib.ReverseFunc, "reverselist": stdlib.ReverseListFunc, "rsadecrypt": crypto.RsaDecryptFunc, From 5d33a3af2298c5ad18f5127731505132b441e5c7 Mon Sep 17 00:00:00 2001 From: Justin Chadwell Date: Wed, 5 Apr 2023 11:48:24 +0100 Subject: [PATCH 2/2] bake: add replace func to stdlib Signed-off-by: Justin Chadwell --- bake/hclparser/stdlib.go | 1 + 1 file changed, 1 insertion(+) diff --git a/bake/hclparser/stdlib.go b/bake/hclparser/stdlib.go index 06269846..4f828ee2 100644 --- a/bake/hclparser/stdlib.go +++ b/bake/hclparser/stdlib.go @@ -79,6 +79,7 @@ var stdlibFunctions = map[string]function.Function{ "regex_replace": stdlib.RegexReplaceFunc, "regex": stdlib.RegexFunc, "regexall": stdlib.RegexAllFunc, + "replace": stdlib.ReplaceFunc, "reverse": stdlib.ReverseFunc, "reverselist": stdlib.ReverseListFunc, "rsadecrypt": crypto.RsaDecryptFunc,