diff options
author | Joe Mooring <joe.mooring@veriphor.com> | 2022-11-24 21:24:18 -0800 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-11-25 09:54:35 +0100 |
commit | b8d5c378baf620781a770559ce2c9d4f690640ba (patch) | |
tree | ec45f7b4dce614d8b917995ebe762aae256cb829 /tpl/math/init.go | |
parent | 75f782a5a7048be7d97c3f40df7251589905968c (diff) |
tpl: Use consistent delimiter spacing in examples
Diffstat (limited to 'tpl/math/init.go')
-rw-r--r-- | tpl/math/init.go | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tpl/math/init.go b/tpl/math/init.go index b4b002a78..19905fd3a 100644 --- a/tpl/math/init.go +++ b/tpl/math/init.go @@ -32,98 +32,98 @@ func init() { ns.AddMethodMapping(ctx.Add, []string{"add"}, [][2]string{ - {"{{add 1 2}}", "3"}, + {"{{ add 1 2 }}", "3"}, }, ) ns.AddMethodMapping(ctx.Ceil, nil, [][2]string{ - {"{{math.Ceil 2.1}}", "3"}, + {"{{ math.Ceil 2.1 }}", "3"}, }, ) ns.AddMethodMapping(ctx.Div, []string{"div"}, [][2]string{ - {"{{div 6 3}}", "2"}, + {"{{ div 6 3 }}", "2"}, }, ) ns.AddMethodMapping(ctx.Floor, nil, [][2]string{ - {"{{math.Floor 1.9}}", "1"}, + {"{{ math.Floor 1.9 }}", "1"}, }, ) ns.AddMethodMapping(ctx.Log, nil, [][2]string{ - {"{{math.Log 1}}", "0"}, + {"{{ math.Log 1 }}", "0"}, }, ) ns.AddMethodMapping(ctx.Max, nil, [][2]string{ - {"{{math.Max 1 2 }}", "2"}, + {"{{ math.Max 1 2 }}", "2"}, }, ) ns.AddMethodMapping(ctx.Min, nil, [][2]string{ - {"{{math.Min 1 2 }}", "1"}, + {"{{ math.Min 1 2 }}", "1"}, }, ) ns.AddMethodMapping(ctx.Mod, []string{"mod"}, [][2]string{ - {"{{mod 15 3}}", "0"}, + {"{{ mod 15 3 }}", "0"}, }, ) ns.AddMethodMapping(ctx.ModBool, []string{"modBool"}, [][2]string{ - {"{{modBool 15 3}}", "true"}, + {"{{ modBool 15 3 }}", "true"}, }, ) ns.AddMethodMapping(ctx.Mul, []string{"mul"}, [][2]string{ - {"{{mul 2 3}}", "6"}, + {"{{ mul 2 3 }}", "6"}, }, ) ns.AddMethodMapping(ctx.Pow, []string{"pow"}, [][2]string{ - {"{{math.Pow 2 3}}", "8"}, + {"{{ math.Pow 2 3 }}", "8"}, }, ) ns.AddMethodMapping(ctx.Round, nil, [][2]string{ - {"{{math.Round 1.5}}", "2"}, + {"{{ math.Round 1.5 }}", "2"}, }, ) ns.AddMethodMapping(ctx.Sqrt, nil, [][2]string{ - {"{{math.Sqrt 81}}", "9"}, + {"{{ math.Sqrt 81 }}", "9"}, }, ) ns.AddMethodMapping(ctx.Sub, []string{"sub"}, [][2]string{ - {"{{sub 3 2}}", "1"}, + {"{{ sub 3 2 }}", "1"}, }, ) |