14 lines
173 B
Go
14 lines
173 B
Go
package main
|
|
|
|
import (
|
|
"encoding/hex"
|
|
)
|
|
|
|
type Hash struct {
|
|
Hash string `json:"hash"`
|
|
}
|
|
|
|
func NewHash(hash []byte) *Hash {
|
|
return &Hash{Hash: hex.EncodeToString(hash)}
|
|
}
|