diff options
author | 6543 <6543@obermui.de> | 2022-01-20 18:46:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 18:46:10 +0100 |
commit | 54e9ee37a7a301dbe74d46fd3c87712e6120e9bf (patch) | |
tree | 1be12fb072625c1b896b9d72f7912b018aad502b /cmd/embedded.go | |
parent | 1d98d205f5825f40110e6628b61a97c91ac7f72d (diff) | |
download | gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.tar.gz gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.zip |
format with gofumpt (#18184)
* gofumpt -w -l .
* gofumpt -w -l -extra .
* Add linter
* manual fix
* change make fmt
Diffstat (limited to 'cmd/embedded.go')
-rw-r--r-- | cmd/embedded.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cmd/embedded.go b/cmd/embedded.go index c608667bf8..2930e5d307 100644 --- a/cmd/embedded.go +++ b/cmd/embedded.go @@ -109,7 +109,6 @@ type asset struct { } func initEmbeddedExtractor(c *cli.Context) error { - // Silence the console logger log.DelNamedLogger("console") log.DelNamedLogger(log.DEFAULT) @@ -260,7 +259,7 @@ func extractAsset(d string, a asset, overwrite, rename bool) error { return fmt.Errorf("%s: %v", dir, err) } - perms := os.ModePerm & 0666 + perms := os.ModePerm & 0o666 fi, err := os.Lstat(dest) if err != nil { @@ -296,7 +295,7 @@ func extractAsset(d string, a asset, overwrite, rename bool) error { } func buildAssetList(sec *section, globs []glob.Glob, c *cli.Context) []asset { - var results = make([]asset, 0, 64) + results := make([]asset, 0, 64) for _, name := range sec.Names() { if isdir, err := sec.IsDir(name); !isdir && err == nil { if sec.Path == "public" && @@ -307,9 +306,11 @@ func buildAssetList(sec *section, globs []glob.Glob, c *cli.Context) []asset { matchName := sec.Path + "/" + name for _, g := range globs { if g.Match(matchName) { - results = append(results, asset{Section: sec, - Name: name, - Path: sec.Path + "/" + name}) + results = append(results, asset{ + Section: sec, + Name: name, + Path: sec.Path + "/" + name, + }) break } } |