mirror of
https://github.com/gohugoio/hugo.git
synced 2025-09-02 22:52:51 +02:00
all: Format files with gofmt
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
37a2d5eb4e
commit
274852bcf2
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user