mirror of
https://github.com/google/uuid.git
synced 2024-11-30 08:57:04 +02:00
hash.go hash error covered and linter error fixed (#71)
* hash.go hash error covered and linter error fixed Error covered without change function definition * Update hash.go
This commit is contained in:
parent
93777840be
commit
b5d0d36c98
4
hash.go
4
hash.go
@ -26,8 +26,8 @@ var (
|
|||||||
// NewMD5 and NewSHA1.
|
// NewMD5 and NewSHA1.
|
||||||
func NewHash(h hash.Hash, space UUID, data []byte, version int) UUID {
|
func NewHash(h hash.Hash, space UUID, data []byte, version int) UUID {
|
||||||
h.Reset()
|
h.Reset()
|
||||||
h.Write(space[:])
|
h.Write(space[:]) //nolint:errcheck
|
||||||
h.Write(data)
|
h.Write(data) //nolint:errcheck
|
||||||
s := h.Sum(nil)
|
s := h.Sum(nil)
|
||||||
var uuid UUID
|
var uuid UUID
|
||||||
copy(uuid[:], s)
|
copy(uuid[:], s)
|
||||||
|
Loading…
Reference in New Issue
Block a user