mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-08 05:50:47 +00:00
Enable gosimple and ineffasign linters
This commit is contained in:
+1
-1
@@ -646,7 +646,7 @@ func (objr objectResource) put(a *action) interface{} {
|
||||
fatalError(400, "TODO", "read error")
|
||||
}
|
||||
gotHash := sum.Sum(nil)
|
||||
if expectHash != nil && bytes.Compare(gotHash, expectHash) != 0 {
|
||||
if expectHash != nil && !bytes.Equal(gotHash, expectHash) {
|
||||
fatalError(400, "BadDigest", "The Content-MD5 you specified did not match what we received")
|
||||
}
|
||||
if a.req.ContentLength >= 0 && int64(len(data)) != a.req.ContentLength {
|
||||
|
||||
Reference in New Issue
Block a user