style: gofumpt all the things (#9829)

Literally `gofumpt -w .` from the top level dir. Guaranteed to be minor
style changes only and nothing else.

@imsodin per request?
This commit is contained in:
Jakob Borg
2024-11-19 11:32:56 +01:00
committed by GitHub
parent 4b815fc086
commit e82ed6e3d3
88 changed files with 376 additions and 379 deletions

View File

@@ -119,7 +119,7 @@ func main() {
bs := readAll(htmlFile)
bs = authorsRe.ReplaceAll(bs, []byte("id=\"contributor-list\">\n"+replacement+"\n </div>"))
if err := os.WriteFile(htmlFile, bs, 0644); err != nil {
if err := os.WriteFile(htmlFile, bs, 0o644); err != nil {
log.Fatal(err)
}

View File

@@ -21,9 +21,11 @@ import (
"golang.org/x/net/html"
)
var trans = make(map[string]interface{})
var attrRe = regexp.MustCompile(`\{\{\s*'([^']+)'\s+\|\s+translate\s*\}\}`)
var attrReCond = regexp.MustCompile(`\{\{.+\s+\?\s+'([^']+)'\s+:\s+'([^']+)'\s+\|\s+translate\s*\}\}`)
var (
trans = make(map[string]interface{})
attrRe = regexp.MustCompile(`\{\{\s*'([^']+)'\s+\|\s+translate\s*\}\}`)
attrReCond = regexp.MustCompile(`\{\{.+\s+\?\s+'([^']+)'\s+:\s+'([^']+)'\s+\|\s+translate\s*\}\}`)
)
// Find both $translate.instant("…") and $translate.instant("…",…) in JS.
// Consider single quote variants too.
@@ -204,7 +206,7 @@ func main() {
}
fd.Close()
var guiDir = os.Args[2]
guiDir := os.Args[2]
filepath.Walk(guiDir, walkerFor(guiDir))
collectThemes(guiDir)