Registry /
utility / mitchellh-hashstructure-v2
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
hashstructure
✓ github.com/mitchellh/hashstructure/v2
Hashes a struct using hashstructure v2.
package main
import (
"fmt"
"github.com/mitchellh/hashstructure/v2"
)
type Person struct {
Name string
Age int
}
func main() {
p := Person{Name: "Alice", Age: 30}
hash, err := hashstructure.Hash(p, hashstructure.FormatV2, nil)
if err != nil {
panic(err)
}
fmt.Printf("Hash: %d\n", hash)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
2.0.2latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.