mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-26 13:47:40 +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:
+6
-2
@@ -17,7 +17,9 @@ func MD5ChecksumForFile(path string) (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
defer file.Close()
|
||||
defer func() {
|
||||
_ = file.Close()
|
||||
}()
|
||||
|
||||
hash := md5.New()
|
||||
_, err = io.Copy(hash, file)
|
||||
@@ -62,7 +64,9 @@ func ChecksumsForFile(path string) (ChecksumInfo, error) {
|
||||
if err != nil {
|
||||
return ChecksumInfo{}, err
|
||||
}
|
||||
defer file.Close()
|
||||
defer func() {
|
||||
_ = file.Close()
|
||||
}()
|
||||
|
||||
return ChecksumsForReader(file)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user