]> Cypherpunks.ru repositories - gocheese.git/blobdiff - integrity.go
Download link for 3.7.1 release
[gocheese.git] / integrity.go
index 3a2d4e0c073e68ed34e5061f227bd0d21216fb74..26fe6a412c0c8388d872cb5879f4922a70a2629e 100644 (file)
@@ -1,6 +1,6 @@
 /*
 GoCheese -- Python private package repository and caching proxy
-Copyright (C) 2019-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2019-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ func checkFile(
        if err != nil {
                log.Fatal(err)
        }
-       isEqual := bytes.Compare(hasher.Sum(digest[:0]), expected) == 0
+       isEqual := bytes.Equal(hasher.Sum(digest[:0]), expected)
        hasher.Reset()
        if isEqual {
                fmt.Println("GOOD", hasherName, pkgName)