tpl: Add math.Abs

Fixes #10941.
This commit is contained in:
Oleksandr Redko
2023-05-16 19:32:07 +03:00
committed by GitHub
parent 241b21b0fd
commit bda082c98c
4 changed files with 46 additions and 1 deletions

View File

@@ -31,6 +31,13 @@ func init() {
Context: func(cctx context.Context, args ...any) (any, error) { return ctx, nil },
}
ns.AddMethodMapping(ctx.Abs,
nil,
[][2]string{
{"{{ math.Abs -2.1 }}", "2.1"},
},
)
ns.AddMethodMapping(ctx.Add,
[]string{"add"},
[][2]string{