{"id":37187135,"url":"https://github.com/scratch-net/hashstructure","last_synced_at":"2026-01-14T21:44:21.940Z","repository":{"id":57578688,"uuid":"360483214","full_name":"Scratch-net/hashstructure","owner":"Scratch-net","description":"Get hash values for arbitrary values in Go (golang).","archived":false,"fork":true,"pushed_at":"2022-12-28T09:01:17.000Z","size":71,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-31T22:42:03.979Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"mitchellh/hashstructure","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Scratch-net.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-22T10:41:24.000Z","updated_at":"2022-12-28T09:01:21.000Z","dependencies_parsed_at":"2023-01-31T06:15:24.032Z","dependency_job_id":null,"html_url":"https://github.com/Scratch-net/hashstructure","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/Scratch-net/hashstructure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scratch-net%2Fhashstructure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scratch-net%2Fhashstructure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scratch-net%2Fhashstructure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scratch-net%2Fhashstructure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Scratch-net","download_url":"https://codeload.github.com/Scratch-net/hashstructure/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scratch-net%2Fhashstructure/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28436186,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T21:32:52.117Z","status":"ssl_error","status_checked_at":"2026-01-14T21:32:33.442Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T21:44:21.381Z","updated_at":"2026-01-14T21:44:21.926Z","avatar_url":"https://github.com/Scratch-net.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hashstructure [![GoDoc](https://godoc.org/github.com/mitchellh/hashstructure?status.svg)](https://godoc.org/github.com/mitchellh/hashstructure)\n\n# THIS IS A FORK of github.com/mitchellh/hashstructure WHICH RETURNS []byte INSTEAD OF uint64!!\n\nhashstructure is a Go library for creating a unique hash value\nfor arbitrary values in Go.\n\nThis can be used to key values in a hash (for use in a map, set, etc.)\nthat are complex. The most common use case is comparing two values without\nsending data across the network, caching values locally (de-dup), and so on.\n\n## Features\n\n  * Hash any arbitrary Go value, including complex types.\n\n  * Tag a struct field to ignore it and not affect the hash value.\n\n  * Tag a slice type struct field to treat it as a set where ordering\n    doesn't affect the hash code but the field itself is still taken into\n    account to create the hash value.\n\n  * Optionally, specify a custom hash function to optimize for speed, collision\n    avoidance for your data set, etc.\n\n  * Optionally, hash the output of `.String()` on structs that implement fmt.Stringer,\n    allowing effective hashing of time.Time\n\n  * Optionally, override the hashing process by implementing `Hashable`.\n\n## Installation\n\nStandard `go get`:\n\n```\n$ go get github.com/scratch-net/hashstructure/v2\n```\n\n**Note on v2:** It is highly recommended you use the \"v2\" release since this\nfixes some significant hash collisions issues from v1. In practice, we used\nv1 for many years in real projects at HashiCorp and never had issues, but it\nis highly dependent on the shape of the data you're hashing and how you use\nthose hashes.\n\nWhen using v2+, you can still generate weaker v1 hashes by using the\n`FormatV1` format when calling `Hash`.\n\n## Usage \u0026 Example\n\nFor usage and examples see the [Godoc](http://godoc.org/github.com/mitchellh/hashstructure).\n\nA quick code example is shown below:\n\n```go\ntype ComplexStruct struct {\n    Name     string\n    Age      uint\n    Metadata map[string]interface{}\n}\n\nv := ComplexStruct{\n    Name: \"mitchellh\",\n    Age:  64,\n    Metadata: map[string]interface{}{\n        \"car\":      true,\n        \"location\": \"California\",\n        \"siblings\": []string{\"Bob\", \"John\"},\n    },\n}\n\nhash, err := hashstructure.Hash(v, hashstructure.FormatV2, nil)\nif err != nil {\n    panic(err)\n}\n\nfmt.Printf(\"%d\", hash)\n// Output:\n// [some hash]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscratch-net%2Fhashstructure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscratch-net%2Fhashstructure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscratch-net%2Fhashstructure/lists"}