media: add ImdbVotes field to Omdb struct

This commit is contained in:
James Bayliss
2021-02-15 20:06:42 +00:00
parent aadc5ece4f
commit 495c5a5c1a
3 changed files with 2 additions and 1 deletions

View File

@@ -9,6 +9,5 @@ func AsSHA256(o interface{}) string {
// credits: https://blog.8bitzen.com/posts/22-08-2019-how-to-hash-a-struct-in-go
h := sha256.New()
h.Write([]byte(fmt.Sprintf("%v", o)))
return fmt.Sprintf("%x", h.Sum(nil))
}