]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
Run gofmt -s on source files
authorAndreas Deininger <andreas@deininger.net>
Fri, 10 Mar 2023 19:18:41 +0000 (20:18 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 12 Mar 2023 09:32:29 +0000 (10:32 +0100)
README.md
common/loggers/loggers.go
common/maps/params.go
hugolib/pagecollections.go
lazy/once.go
resources/page/page_paths.go
tpl/templates/integration_test.go
watcher/filenotify/poller.go

index b776e1326a6b11cab0339fe03e84a4060d0ad24a..a07c95e33034106d137ae8f59fa6dd11a504da0e 100644 (file)
--- a/README.md
+++ b/README.md
@@ -124,7 +124,7 @@ Hugo stands on the shoulder of many great open source libraries.
 
 If you run `hugo env -v` you will get a complete and up to date list.
 
-In Hugo 0.110.2 that list is, in lexical order:
+In Hugo 0.111.2 that list is, in lexical order:
 
 ```
 cloud.google.com/go/compute="v1.6.1"
index 2c331352a6b8a144f08e67ad35423fd074391745..824fe18bd96af4d9db7565810b62cddec8dfd573 100644 (file)
@@ -204,7 +204,7 @@ func (l *logger) Reset() {
        }
 }
 
-//  NewLogger creates a new Logger for the given thresholds
+// NewLogger creates a new Logger for the given thresholds
 func NewLogger(stdoutThreshold, logThreshold jww.Threshold, outHandle, logHandle io.Writer, saveErrors bool) Logger {
        return newLogger(stdoutThreshold, logThreshold, outHandle, logHandle, saveErrors)
 }
index 60fe56668cdedf3b01b0fcb8a3f5217a9afc7e59..4bf95f43b93a831c9650d50a4ed7863c99efa579 100644 (file)
@@ -62,7 +62,7 @@ func (p Params) IsZero() bool {
                return false
        }
 
-       for k, _ := range p {
+       for k := range p {
                return k == mergeStrategyKey
        }
 
index 0d901d6b22c27b36bcd990cbc4b1efd56b633530..6f7d291bc691a7645cba1c9c188fa73b1cff2390 100644 (file)
@@ -143,7 +143,7 @@ func (c *PageCollections) getPageOldVersion(ref ...string) (page.Page, error) {
        return c.getPageNew(nil, key)
 }
 
-//     Only used in tests.
+// Only used in tests.
 func (c *PageCollections) getPage(typ string, sections ...string) page.Page {
        refs := append([]string{typ}, path.Join(sections...))
        p, _ := c.getPageOldVersion(refs...)
index bdce12c330b8c73789bc2191949bdeb99e15a4f0..c6abcd884930bd60c18ad7a09b328b4b5e84e6e2 100644 (file)
@@ -23,7 +23,7 @@ import (
 // Additional features are:
 // * it can be reset, so the action can be repeated if needed
 // * it has methods to check if it's done or in progress
-//
+
 type onceMore struct {
        mu   sync.Mutex
        lock uint32
index 3d34866d147e8b6a3e92993c5a7422e87148afd3..8c718fd77819c51c4ecddf569e299ecd09b8160f 100644 (file)
@@ -30,8 +30,7 @@ const slash = "/"
 //
 // The big motivating behind this is to have only one source of truth for URLs,
 // and by that also get rid of most of the fragile string parsing/encoding etc.
-//
-//
+
 type TargetPathDescriptor struct {
        PathSpec *helpers.PathSpec
 
index d6ea9228dd25e1b15cc79912e76df0daa514d0e7..7935fa5e396575a144cb65f5266b27fafa8ac3ff 100644 (file)
@@ -84,7 +84,6 @@ post/doesnotexist.html: false
 `)
 }
 
-
 // See #10774
 func TestPageFunctionExists(t *testing.T) {
        t.Parallel()
index 7479dcbdde63269d027e65fb25b7627a1ccff417..91e1e21b891b45de0918c65e811e7dc5e66a95c6 100644 (file)
@@ -268,7 +268,7 @@ func (item *itemToWatch) checkForChanges() ([]fsnotify.Event, error) {
        dirOp := checkChange(item.left.FileInfo, item.right.FileInfo)
 
        if dirOp != 0 {
-               evs := []fsnotify.Event{fsnotify.Event{Op: dirOp, Name: item.filename}}
+               evs := []fsnotify.Event{{Op: dirOp, Name: item.filename}}
                return evs, nil
        }