all: Format files with gofmt

This commit is contained in:
Oleksandr Redko 2023-10-04 22:25:43 +03:00 committed by Bjørn Erik Pedersen
parent 37a2d5eb4e
commit 274852bcf2
4 changed files with 23 additions and 18 deletions

View file

@ -51,6 +51,7 @@ var pb pathBridge
// MakePermalink combines base URL with content path to create full URL paths. // MakePermalink combines base URL with content path to create full URL paths.
// Example // Example
//
// base: http://spf13.com/ // base: http://spf13.com/
// path: post/how-i-blog // path: post/how-i-blog
// result: http://spf13.com/post/how-i-blog // result: http://spf13.com/post/how-i-blog
@ -117,6 +118,7 @@ func PrettifyURL(in string) string {
// PrettifyURLPath takes a URL path to a content and converts it // PrettifyURLPath takes a URL path to a content and converts it
// to enable pretty URLs. // to enable pretty URLs.
//
// /section/name.html becomes /section/name/index.html // /section/name.html becomes /section/name/index.html
// /section/name/ becomes /section/name/index.html // /section/name/ becomes /section/name/index.html
// /section/name/index.html becomes /section/name/index.html // /section/name/index.html becomes /section/name/index.html
@ -125,6 +127,7 @@ func PrettifyURLPath(in string) string {
} }
// Uglify does the opposite of PrettifyURLPath(). // Uglify does the opposite of PrettifyURLPath().
//
// /section/name/index.html becomes /section/name.html // /section/name/index.html becomes /section/name.html
// /section/name/ becomes /section/name.html // /section/name/ becomes /section/name.html
// /section/name.html becomes /section/name.html // /section/name.html becomes /section/name.html

View file

@ -20,6 +20,7 @@ const (
// Round returns the nearest integer, rounding half away from zero. // Round returns the nearest integer, rounding half away from zero.
// //
// Special cases are: // Special cases are:
//
// Round(±0) = ±0 // Round(±0) = ±0
// Round(±Inf) = ±Inf // Round(±Inf) = ±Inf
// Round(NaN) = NaN // Round(NaN) = NaN

View file

@ -213,6 +213,7 @@ func (c *templateContext) hasIdent(idents []string, ident string) bool {
// collectConfig collects and parses any leading template config variable declaration. // 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 // This will be the first PipeNode in the template, and will be a variable declaration
// on the form: // on the form:
//
// {{ $_hugo_config:= `{ "version": 1 }` }} // {{ $_hugo_config:= `{ "version": 1 }` }}
func (c *templateContext) collectConfig(n *parse.PipeNode) { func (c *templateContext) collectConfig(n *parse.PipeNode) {
if c.t.typ != templateShortcode { if c.t.typ != templateShortcode {