mirror of
https://github.com/syncthing/syncthing.git
synced 2025-12-23 22:18:14 -05:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user