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:
@@ -10,9 +10,7 @@ import (
|
||||
"github.com/syncthing/syncthing/lib/logger"
|
||||
)
|
||||
|
||||
var (
|
||||
l = logger.DefaultLogger.NewFacility("app", "Main run facility")
|
||||
)
|
||||
var l = logger.DefaultLogger.NewFacility("app", "Main run facility")
|
||||
|
||||
func shouldDebug() bool {
|
||||
return l.ShouldDebug("app")
|
||||
|
||||
@@ -33,7 +33,7 @@ func EnsureDir(dir string, mode fs.FileMode) error {
|
||||
// Apparently the stat may fail even though the mkdirall passed. If it
|
||||
// does, we'll just assume things are in order and let other things
|
||||
// fail (like loading or creating the config...).
|
||||
currentMode := fi.Mode() & 0777
|
||||
currentMode := fi.Mode() & 0o777
|
||||
if currentMode != mode {
|
||||
err := fs.Chmod(".", mode)
|
||||
// This can fail on crappy filesystems, nothing we can do about it.
|
||||
@@ -139,7 +139,7 @@ func copyFile(src, dst string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := os.WriteFile(dst, bs, 0600); err != nil {
|
||||
if err := os.WriteFile(dst, bs, 0o600); err != nil {
|
||||
// Attempt to clean up
|
||||
os.Remove(dst)
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user