libgit2: use `bytes.Equal` instead of `.Compare`

Signed-off-by: Hidde Beydals <hello@hidde.co>
This commit is contained in:
Hidde Beydals 2021-11-23 09:11:24 +01:00
parent 9c1c8149a5
commit ab089ddb07
1 changed files with 1 additions and 1 deletions

View File

@ -266,7 +266,7 @@ func (k knownKey) matches(host string, hostkey git2go.HostkeyCertificate) bool {
return false
}
hasher.Write(k.key.Marshal())
return bytes.Compare(hasher.Sum(nil), fingerprint) == 0
return bytes.Equal(hasher.Sum(nil), fingerprint)
}
func containsHost(hosts []string, host string) bool {