fix: typo in README.md (#58)

Declare two undeclared variables
This commit is contained in:
Petrichor 2022-10-09 19:42:03 +08:00 committed by GitHub
parent 571ae3865a
commit 464cef2de9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,8 +39,8 @@ func main() {
distance, _ = hash1.Distance(hash2) distance, _ = hash1.Distance(hash2)
fmt.Printf("Distance between images: %v\n", distance) fmt.Printf("Distance between images: %v\n", distance)
width, height := 8, 8 width, height := 8, 8
hash3, _ = goimagehash.ExtAverageHash(img1, width, height) hash3, _ := goimagehash.ExtAverageHash(img1, width, height)
hash4, _ = goimagehash.ExtAverageHash(img2, width, height) hash4, _ := goimagehash.ExtAverageHash(img2, width, height)
distance, _ = hash3.Distance(hash4) distance, _ = hash3.Distance(hash4)
fmt.Printf("Distance between images: %v\n", distance) fmt.Printf("Distance between images: %v\n", distance)
fmt.Printf("hash3 bit size: %v\n", hash3.Bits()) fmt.Printf("hash3 bit size: %v\n", hash3.Bits())