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 /build/generate-gitignores.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 'build/generate-gitignores.go')
-rw-r--r-- | build/generate-gitignores.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/build/generate-gitignores.go b/build/generate-gitignores.go index 811953ee4a..0f7d719d40 100644 --- a/build/generate-gitignores.go +++ b/build/generate-gitignores.go @@ -34,7 +34,6 @@ func main() { flag.Parse() file, err := os.CreateTemp(os.TempDir(), prefix) - if err != nil { log.Fatalf("Failed to create temp file. %s", err) } @@ -65,7 +64,6 @@ func main() { } gz, err := gzip.NewReader(file) - if err != nil { log.Fatalf("Failed to gunzip the archive. %s", err) } @@ -96,7 +94,6 @@ func main() { } out, err := os.Create(path.Join(destination, strings.TrimSuffix(filepath.Base(hdr.Name), ".gitignore"))) - if err != nil { log.Fatalf("Failed to create new file. %s", err) } @@ -119,7 +116,7 @@ func main() { } // Write data to dst dst = path.Join(destination, dst) - err = os.WriteFile(dst, data, 0644) + err = os.WriteFile(dst, data, 0o644) if err != nil { log.Fatalf("Failed to write new file. %s", err) } |