Standard library / hash/maphash

hash/maphash.MakeSeed()

Generate an initialized seed for a new hash-table instance. It is process-local and not a reproducible serialized value. This is not a cryptographic authentication primitive. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
func MakeSeed() Seed

Return Value

Seed

Initialized process-local hash seed.

Working Example

Example Snippetgo
package main
import (  "fmt"  "hash/maphash")
func main() { s := maphash.MakeSeed(); var h maphash.Hash; h.SetSeed(s); fmt.Println(h.Seed() == s) }
Go Reference