summaryrefslogtreecommitdiffstats
path: root/helpers/content.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-12-02 13:23:25 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-12-03 13:12:58 +0100
commitd90e37e0c6e812f9913bf256c9c81aa05b7a08aa (patch)
tree7b1b14464eefec1188ca2eed53c64e4823453cc9 /helpers/content.go
parent32471b57bde51c55a15dbf1db75d6e5f7232c347 (diff)
all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
Diffstat (limited to 'helpers/content.go')
-rw-r--r--helpers/content.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/helpers/content.go b/helpers/content.go
index c59e41a8c..5e56ad6bf 100644
--- a/helpers/content.go
+++ b/helpers/content.go
@@ -20,6 +20,7 @@ package helpers
import (
"bytes"
"html/template"
+ "strings"
"unicode"
"unicode/utf8"
@@ -33,8 +34,6 @@ import (
bp "github.com/gohugoio/hugo/bufferpool"
"github.com/gohugoio/hugo/config"
-
- "strings"
)
// SummaryDivider denotes where content summarization should end. The default is "<!--more-->".
@@ -66,7 +65,6 @@ type ContentSpec struct {
// NewContentSpec returns a ContentSpec initialized
// with the appropriate fields from the given config.Provider.
func NewContentSpec(cfg config.Provider, logger loggers.Logger, contentFs afero.Fs) (*ContentSpec, error) {
-
spec := &ContentSpec{
summaryLength: cfg.GetInt("summaryLength"),
BuildFuture: cfg.GetBool("buildFuture"),
@@ -81,7 +79,6 @@ func NewContentSpec(cfg config.Provider, logger loggers.Logger, contentFs afero.
ContentFs: contentFs,
Logger: logger,
})
-
if err != nil {
return nil, err
}
@@ -112,7 +109,6 @@ var stripHTMLReplacer = strings.NewReplacer("\n", " ", "</p>", "\n", "<br>", "\n
// StripHTML accepts a string, strips out all HTML tags and returns it.
func StripHTML(s string) string {
-
// Shortcut strings with no tags in them
if !strings.ContainsAny(s, "<>") {
return s