{"id":32523142,"url":"https://github.com/go-utils/dedupe","last_synced_at":"2025-10-28T07:48:09.667Z","repository":{"id":140137098,"uuid":"262936144","full_name":"go-utils/dedupe","owner":"go-utils","description":"Easy Deduplication","archived":false,"fork":false,"pushed_at":"2022-04-07T00:59:39.000Z","size":30,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-15T09:52:18.960Z","etag":null,"topics":["dedup","deduplication","go","golang"],"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/go-utils.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-11T04:14:56.000Z","updated_at":"2023-06-29T13:22:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"4a80795c-f558-47b5-ab2d-c99c01a81baf","html_url":"https://github.com/go-utils/dedupe","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/go-utils/dedupe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-utils%2Fdedupe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-utils%2Fdedupe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-utils%2Fdedupe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-utils%2Fdedupe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-utils","download_url":"https://codeload.github.com/go-utils/dedupe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-utils%2Fdedupe/sbom","scorecard":{"id":432599,"data":{"date":"2025-08-11","repo":{"name":"github.com/go-utils/dedupe","commit":"aecc4c88b232c00bba678d28b0464bdcdbc2e3e9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"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":"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":"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Code-Review","score":0,"reason":"Found 0/24 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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/go-utils/dedupe/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/go-utils/dedupe/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/go-utils/dedupe/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reviewdog.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/go-utils/dedupe/reviewdog.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/reviewdog.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/go-utils/dedupe/reviewdog.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Warn: no topLevel permission defined: .github/workflows/reviewdog.yml:1","Info: no jobLevel write permissions found"],"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":"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":"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:43:02.071Z","repository_id":140137098,"created_at":"2025-08-19T03:43:02.071Z","updated_at":"2025-08-19T03:43:02.071Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281403420,"owners_count":26495042,"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","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"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":["dedup","deduplication","go","golang"],"created_at":"2025-10-28T07:48:06.434Z","updated_at":"2025-10-28T07:48:09.660Z","avatar_url":"https://github.com/go-utils.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is this?\n[]int{1, 2, 3, 3}, []string{\"1\", \"2\", \"3\", \"3\"}, []float64{0.1, 0.2, 0.3, 0.3} etc.   \nYou have to implement each type by yourself when removing duplicates from existing slices.  \nAt that time, I made something that was put together and can be used even a little.\n\n# Installation\n```commandline\ngo get -u github.com/go-utils/dedupe\n```\n\n# Usage\n```go\nimport (\n    \"fmt\"\n\n    \"github.com/go-utils/dedupe\"\n)\n\nfunc main() {\n    fmt.Println(\"[Case1]\")\n    // Basic usage\n    sliceString := []string{\"Go\", \"V\", \"C++\", \"Java\", \"Python\", \"Go\", \"Ruby\", \"C++\", \"Go\", \"V\"}\n    dedupe.Do(\u0026sliceString)                               // Be sure to pass it by address\n    fmt.Printf(\"original  slice -\u003e %#v\\n\\n\", sliceString) // change original slice\n\n    fmt.Println(\"[Case2]\")\n    // Extract duplicates without changing the original slice\n    // But: If it is a structure, you must cast it yourself\n    sliceFloat64 := []float64{0.1, 0.1, 0.2, 0.2, 0.3, 0.3}\n    dup := dedupe.NewDeduplication() // or \u0026dedupe.Deduplication{NotChange: true}\n    dup.Do(\u0026sliceFloat64)            // Be sure to pass it by address\n    if src, err := dup.Float64(); err == nil {\n        fmt.Printf(\"extracted slice -\u003e %#v\\n\", src)\n    }\n    fmt.Printf(\"original  slice -\u003e %#v\\n\", sliceFloat64)\n}\n```\n\n### Result\n```\n[Case1]\noriginal  slice -\u003e []string{\"C++\", \"Go\", \"Java\", \"Python\", \"Ruby\", \"V\"}\n\n[Case2]\nextracted slice -\u003e []float64{0.1, 0.2, 0.3}\noriginal  slice -\u003e []float64{0.1, 0.1, 0.2, 0.2, 0.3, 0.3}\n```\nCheck [Go Playground](https://play.golang.org/p/QEUKQciGp4J)  \nCheck [Other patterns](https://github.com/go-utils/dedupe/blob/master/example/main.go)\n\n# Support\n`[]bool` `[]float32` `[]float64` `[]int` `[]int64` `[]uint` `[]uint64` `[]string`  \n`[]struct` `[]*struct` `[]AnyType`\n\n### No Support\n`[]func`\n\n# License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-utils%2Fdedupe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-utils%2Fdedupe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-utils%2Fdedupe/lists"}