{"id":40955695,"url":"https://github.com/gochore/uniq","last_synced_at":"2026-01-22T05:36:35.186Z","repository":{"id":54695824,"uuid":"228123975","full_name":"gochore/uniq","owner":"gochore","description":"Sort and deduplicate data.","archived":false,"fork":false,"pushed_at":"2021-02-03T10:51:23.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-14T21:54:37.634Z","etag":null,"topics":["deduplicate-data","go","golang","sort","uniq"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gochore.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":"2019-12-15T03:38:09.000Z","updated_at":"2021-02-03T10:50:56.000Z","dependencies_parsed_at":"2022-08-14T00:20:12.389Z","dependency_job_id":null,"html_url":"https://github.com/gochore/uniq","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/gochore/uniq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gochore%2Funiq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gochore%2Funiq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gochore%2Funiq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gochore%2Funiq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gochore","download_url":"https://codeload.github.com/gochore/uniq/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gochore%2Funiq/sbom","scorecard":{"id":433192,"data":{"date":"2025-08-11","repo":{"name":"github.com/gochore/uniq","commit":"0bcd11a77a9f3a830c35c4c91952515c27eed20e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/19 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 15 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T03:52:40.085Z","repository_id":54695824,"created_at":"2025-08-19T03:52:40.085Z","updated_at":"2025-08-19T03:52:40.085Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28656383,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["deduplicate-data","go","golang","sort","uniq"],"created_at":"2026-01-22T05:36:35.100Z","updated_at":"2026-01-22T05:36:35.181Z","avatar_url":"https://github.com/gochore.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# uniq\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/gochore/uniq.svg)](https://pkg.go.dev/github.com/gochore/uniq)\n[![Build Status](https://travis-ci.com/gochore/uniq.svg?branch=master)](https://travis-ci.com/gochore/uniq)\n[![codecov](https://codecov.io/gh/gochore/uniq/branch/master/graph/badge.svg)](https://codecov.io/gh/gochore/uniq)\n[![Go Report Card](https://goreportcard.com/badge/github.com/gochore/uniq)](https://goreportcard.com/report/github.com/gochore/uniq)\n[![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/gochore/uniq)](https://github.com/gochore/uniq/blob/master/go.mod)\n[![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/gochore/uniq)](https://github.com/gochore/uniq/releases)\n\nSort and deduplicate data.\n\n## Example\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"sort\"\n\n\t\"github.com/gochore/uniq\"\n)\n\nfunc main() {\n\tints1 := []int{1, 2, 1, 2, 4, 4, 4, 3, 3}\n\tints2 := make([]int, len(ints1))\n\tcopy(ints2, ints1)\n\n\tfmt.Println(ints1)\n\t// [1 2 1 2 4 4 4 3 3]\n\tsort.Ints(ints1)\n\tfmt.Println(ints1)\n\t// [1 1 2 2 3 3 4 4 4]\n\tints2 = ints2[:uniq.Ints(ints2)]\n\tfmt.Println(ints2)\n\t// [1 2 3 4]\n\n\tkvs1 := []KV{{\"a\", 5}, {\"b\", 2}, {\"a\", 5}, {\"b\", 4}, {\"c\", 9}}\n\tless1 := func(i, j int) bool {\n\t\treturn kvs1[i].K \u003c kvs1[j].K\n\t}\n\tkvs2 := make([]KV, len(kvs1))\n\tcopy(kvs2, kvs1)\n\tless2 := func(i, j int) bool {\n\t\treturn kvs2[i].K \u003c kvs2[j].K || kvs2[i].K == kvs2[j].K \u0026\u0026 kvs2[i].V \u003c kvs2[j].V\n\t}\n\tfmt.Println(kvs1)\n\t// [{a 5} {b 2} {a 5} {b 4} {c 9}]\n\tsort.Slice(kvs1, less1)\n\tfmt.Println(kvs1)\n\t// [{a 5} {a 5} {b 2} {b 4} {c 9}]\n\tkvs2 = kvs2[:uniq.Slice(kvs2, less2)]\n\tfmt.Println(kvs2)\n\t// [{a 5} {b 2} {b 4} {c 9}]\n}\n\ntype KV struct {\n\tK string\n\tV int\n}\n```\n\n## Document\n\n#### func  Float64s\n\n```go\nfunc Float64s(s []float64) int\n```\nFloat64s sorts and deduplicates a slice of float64s in increasing order\n(not-a-number values are treated as less than other values).\n\n#### func  Float64sAreSorted\n\n```go\nfunc Float64sAreSorted(a []float64) bool\n```\nFloat64sAreSorted tests whether a slice of float64s is sorted and deduplicated\nin increasing order (not-a-number values are treated as less than other values).\n\n#### func  Ints\n\n```go\nfunc Ints(s []int) int\n```\nInts sorts and deduplicates a slice of ints in increasing order.\n\n#### func  IntsAreSorted\n\n```go\nfunc IntsAreSorted(a []int) bool\n```\nIntsAreSorted tests whether a slice of ints is sorted and deduplicated in\nincreasing order.\n\n#### func  IsSorted\n\n```go\nfunc IsSorted(data sort.Interface) bool\n```\nIsSorted reports if data is sorted and deduplicated.\n\n#### func  Slice\n\n```go\nfunc Slice(slice interface{}, less func(i, j int) bool) int\n```\nSlice sorts and deduplicates the provided slice given the provided less\nfunction.\n\n#### func  SliceIsSorted\n\n```go\nfunc SliceIsSorted(data interface{}, less func(i, j int) bool) bool\n```\nSliceIsSorted reports if slice is sorted and deduplicated.\n\n#### func  SliceStable\n\n```go\nfunc SliceStable(slice interface{}, less func(i, j int) bool) int\n```\nSliceStable sorts and deduplicates the provided slice given the provided less\nfunction while keeping the original order of equal elements.\n\n#### func  Sort\n\n```go\nfunc Sort(data sort.Interface) int\n```\nSort sorts and deduplicated data.\n\n#### func  Stable\n\n```go\nfunc Stable(data sort.Interface) int\n```\nStable sorts and deduplicates data while keeping the original order of equal\nelements.\n\n#### func  Strings\n\n```go\nfunc Strings(s []string) int\n```\nStrings sorts and deduplicates a slice of strings in increasing order.\n\n#### func  StringsAreSorted\n\n```go\nfunc StringsAreSorted(a []string) bool\n```\nStringsAreSorted tests whether a slice of strings is sorted and deduplicated in\nincreasing order.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgochore%2Funiq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgochore%2Funiq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgochore%2Funiq/lists"}