Write writes bytes to the underlying hash.
(data []byte)
| 45 | |
| 46 | // Write writes bytes to the underlying hash. |
| 47 | func (h *AdvisoryLockHash) Write(data []byte) { |
| 48 | var activeHash hash.Hash = h.hash32 |
| 49 | if h.configuredPrefix == 0 { |
| 50 | activeHash = h.hash64 |
| 51 | } |
| 52 | |
| 53 | _, err := activeHash.Write(data) |
| 54 | if err != nil { |
| 55 | panic(err) // error basically impossible, so panic for caller convenience |
| 56 | } |
| 57 | } |
no outgoing calls