Standard library / hash/maphash
hash/maphash.Hash.WriteByte()
Append a single byte; returns nil. This is not a cryptographic authentication primitive. Expected stdout: '<nil> true\n'.
Formal Syntax & Structure
go syntaxgo
func (h *Hash) WriteByte(b byte) errorParameters & Attributes
| Name | Type | Description |
|---|---|---|
| b | byte | Input bytes to hash, or prefix slice for Sum; see description. |
Return Value
error
Always nil.
Working Example
Example Snippetgo
package main
import ( "fmt" "hash/maphash")
func main() { var h maphash.Hash e := h.WriteByte(71) fmt.Println(e, h.Sum64() == maphash.String(h.Seed(), "G"))}