music-library/hash.go

14 lines
173 B
Go
Raw Normal View History

2023-02-16 14:36:52 +01:00
package main
import (
"encoding/hex"
)
type Hash struct {
Hash string `json:"hash"`
}
func NewHash(hash []byte) *Hash {
return &Hash{Hash: hex.EncodeToString(hash)}
}