From 54e9ee37a7a301dbe74d46fd3c87712e6120e9bf Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Thu, 20 Jan 2022 18:46:10 +0100 Subject: format with gofumpt (#18184) * gofumpt -w -l . * gofumpt -w -l -extra . * Add linter * manual fix * change make fmt --- modules/markup/html.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'modules/markup/html.go') diff --git a/modules/markup/html.go b/modules/markup/html.go index f082b97dbb..e28e26c6d1 100644 --- a/modules/markup/html.go +++ b/modules/markup/html.go @@ -202,7 +202,7 @@ func RenderCommitMessage( ctx *RenderContext, content string, ) (string, error) { - var procs = commitMessageProcessors + procs := commitMessageProcessors if ctx.DefaultLink != "" { // we don't have to fear data races, because being // commitMessageProcessors of fixed len and cap, every time we append @@ -238,7 +238,7 @@ func RenderCommitMessageSubject( ctx *RenderContext, content string, ) (string, error) { - var procs = commitMessageSubjectProcessors + procs := commitMessageSubjectProcessors if ctx.DefaultLink != "" { // we don't have to fear data races, because being // commitMessageSubjectProcessors of fixed len and cap, every time we @@ -291,8 +291,10 @@ func RenderEmoji( return renderProcessString(&RenderContext{}, emojiProcessors, content) } -var tagCleaner = regexp.MustCompile(`<((?:/?\w+/\w+)|(?:/[\w ]+/)|(/?[hH][tT][mM][lL]\b)|(/?[hH][eE][aA][dD]\b))`) -var nulCleaner = strings.NewReplacer("\000", "") +var ( + tagCleaner = regexp.MustCompile(`<((?:/?\w+/\w+)|(?:/[\w ]+/)|(/?[hH][tT][mM][lL]\b)|(/?[hH][eE][aA][dD]\b))`) + nulCleaner = strings.NewReplacer("\000", "") +) func postProcess(ctx *RenderContext, procs []processor, input io.Reader, output io.Writer) error { defer ctx.Cancel() -- cgit v1.2.3