mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-04-20 19:38:39 +00:00
go1.24: fix lint, unit and system tests
- development env: base on debian trixie with go1.24 - lint: run with default config - fix lint errors - fix unit tests - fix system test
This commit is contained in:
@@ -18,12 +18,16 @@ func CompressFile(source *os.File, onlyGzip bool) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer gzFile.Close()
|
||||
defer func() {
|
||||
_ = gzFile.Close()
|
||||
}()
|
||||
|
||||
gzWriter := pgzip.NewWriter(gzFile)
|
||||
defer gzWriter.Close()
|
||||
defer func() {
|
||||
_ = gzWriter.Close()
|
||||
}()
|
||||
|
||||
source.Seek(0, 0)
|
||||
_, _ = source.Seek(0, 0)
|
||||
_, err = io.Copy(gzWriter, source)
|
||||
if err != nil || onlyGzip {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user