diff options
author | Oleksandr Redko <Oleksandr_Redko@epam.com> | 2023-10-04 22:25:43 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-10-05 14:45:55 +0200 |
commit | 274852bcf254230fae30bed4883049ec94462e85 (patch) | |
tree | a8276d0c666d8fb16ba832d932c77c3458a1824b /tpl | |
parent | 37a2d5eb4e99b102ba39616917a4c76cb8a142a7 (diff) |
all: Format files with gofmt
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/math/round.go | 15 | ||||
-rw-r--r-- | tpl/tplimpl/template_ast_transformers.go | 3 |
2 files changed, 10 insertions, 8 deletions
diff --git a/tpl/math/round.go b/tpl/math/round.go index 9b33120af..e2b5057e0 100644 --- a/tpl/math/round.go +++ b/tpl/math/round.go @@ -20,19 +20,20 @@ const ( // Round returns the nearest integer, rounding half away from zero. // // Special cases are: +// // Round(±0) = ±0 // Round(±Inf) = ±Inf // Round(NaN) = NaN func _round(x float64) float64 { // Round is a faster implementation of: // - // func Round(x float64) float64 { - // t := Trunc(x) - // if Abs(x-t) >= 0.5 { - // return t + Copysign(1, x) - // } - // return t - // } + // func Round(x float64) float64 { + // t := Trunc(x) + // if Abs(x-t) >= 0.5 { + // return t + Copysign(1, x) + // } + // return t + // } const ( signMask = 1 << 63 fracMask = 1<<shift - 1 diff --git a/tpl/tplimpl/template_ast_transformers.go b/tpl/tplimpl/template_ast_transformers.go index bc02d93ac..8d5d8d1b3 100644 --- a/tpl/tplimpl/template_ast_transformers.go +++ b/tpl/tplimpl/template_ast_transformers.go @@ -213,7 +213,8 @@ func (c *templateContext) hasIdent(idents []string, ident string) bool { // collectConfig collects and parses any leading template config variable declaration. // This will be the first PipeNode in the template, and will be a variable declaration // on the form: -// {{ $_hugo_config:= `{ "version": 1 }` }} +// +// {{ $_hugo_config:= `{ "version": 1 }` }} func (c *templateContext) collectConfig(n *parse.PipeNode) { if c.t.typ != templateShortcode { return |