{"id":21740147,"url":"https://github.com/bserdar/slicemap","last_synced_at":"2025-07-12T16:33:47.223Z","repository":{"id":65230988,"uuid":"587121923","full_name":"bserdar/slicemap","owner":"bserdar","description":"A Go map that uses slice of values as key","archived":false,"fork":false,"pushed_at":"2023-01-10T02:24:40.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-25T21:27:19.751Z","etag":null,"topics":["data-structures","go","golang","map","slice"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bserdar.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":"2023-01-10T02:17:17.000Z","updated_at":"2023-01-10T02:24:44.000Z","dependencies_parsed_at":"2023-01-15T18:00:51.077Z","dependency_job_id":null,"html_url":"https://github.com/bserdar/slicemap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bserdar%2Fslicemap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bserdar%2Fslicemap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bserdar%2Fslicemap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bserdar%2Fslicemap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bserdar","download_url":"https://codeload.github.com/bserdar/slicemap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244717339,"owners_count":20498284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["data-structures","go","golang","map","slice"],"created_at":"2024-11-26T06:12:24.752Z","updated_at":"2025-03-21T01:13:06.251Z","avatar_url":"https://github.com/bserdar.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GoDoc](https://godoc.org/github.com/bserdar/slicemap?status.svg)](https://godoc.org/github.com/bserdar/slicemap)\n[![Go Report Card](https://goreportcard.com/badge/github.com/bserdar/slicemap)](https://goreportcard.com/report/github.com/bserdar/slicemap)\n\n# Slicemap\n\nThis package implements a map that uses a slice of values as key.\n\nGo does not allow using slices as map keys. This especially becomes\ncumbersome if you have a composite key with non-constant number of\nelements. This package uses a nested map structure to associate values\nwith keys where the keys are a slice of a comparable object.\n\n```\nsm:=SliceMap[string,int]{} // Create a map[[]string]int\nsm.Put([]string{\"a\",\"b\",\"c\"},1)\nsm.Put([]string{\"d\",\"e\"},2)\nfmt.Println(sm.Get([]string{\"a\",\"b\",\"c\"})) // Prints 1, true\nfmt.Println(sm.Get([]string{\"d\",\"e\"}))  // Prints 2, true\nfmt.Println(sm.Get([]string{\"f\",\"g\"}))  // Prints 0, false\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbserdar%2Fslicemap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbserdar%2Fslicemap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbserdar%2Fslicemap/lists"}