{"id":37096484,"url":"https://github.com/chensanle/sliset","last_synced_at":"2026-01-14T11:52:35.878Z","repository":{"id":59046323,"uuid":"532528549","full_name":"chensanle/sliset","owner":"chensanle","description":"a series basic set operations for slice type. union, interaction, difference and so on.","archived":false,"fork":false,"pushed_at":"2024-06-22T02:09:10.000Z","size":29,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-22T15:06:12.222Z","etag":null,"topics":["generic","generics","golnag","interaction","set","slice"],"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/chensanle.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":"2022-09-04T12:06:11.000Z","updated_at":"2024-06-22T02:08:52.000Z","dependencies_parsed_at":"2024-06-20T03:16:04.093Z","dependency_job_id":"56c400f9-3c6a-41b5-8197-b76115e77dde","html_url":"https://github.com/chensanle/sliset","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/chensanle/sliset","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chensanle%2Fsliset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chensanle%2Fsliset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chensanle%2Fsliset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chensanle%2Fsliset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chensanle","download_url":"https://codeload.github.com/chensanle/sliset/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chensanle%2Fsliset/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28419272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","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":["generic","generics","golnag","interaction","set","slice"],"created_at":"2026-01-14T11:52:35.365Z","updated_at":"2026-01-14T11:52:35.874Z","avatar_url":"https://github.com/chensanle.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"sliset: a series basic set operations for slice type\n===\n[![Doc of Sliset][4]][3]\n[![Go Report Card][2]][1]\n[![Codecov][6]][5]\n[![golang-lint][8]][7]\n\n基于泛型的 slice 伪集合操作，封装常见的 union、interaction 和 difference 等函数。\n\n## Installation\n\nStandard  `go get`:\n\n```\n$  go get -v -u github.com/chensanle/sliset\n```\n\n## Usage \u0026 Example\n```go\n// Difference res = base - compared\nfunc Difference(base, compared []E1) []E1\n\n// Intersection res = base ∩ compared\nfunc Intersection(base, compared []E1) []E1\n\n// Union res = base U compared\nfunc Union(base, compared []E1) []E1\n\n// Uniq remove duplicate elements from the base.\nfunc Uniq(base []E1) []E1\n```\n\n###  example 1:  Difference()\n```go\nr1 := sliset.Difference([]string{\"apple\", \"fb\", \"ali\"}, []string{\"apple\"})\nfmt.Println(\"output: \", r1)\n// output: []string{\"ali\"}\n\nr2 := sliset.Difference([]int{1949, 1997, 2008}, []int{2008})\nfmt.Println(\"output: \", r2)\n// output: []string{1949, 1997}\n```\n\n###  example 2:  Uniq()\n```go\nr1 := sliset.Uniq([]string{\"apple\", \"fb\", \"ali\", \"apple\"})\nfmt.Println(\"output: \", r1)\n// output: []string{\"apple\", \"fb\", \"ali\"} \n\nr2 := sliset.Uniq([]int{1949, 1997, 2008, 1949})\nfmt.Println(\"output: \", r2)\n// output: []string{1949, 1997, 2008}\n```\n\n[1]: \u003chttps://goreportcard.com/report/github.com/chensanle/sliset\u003e \"Go Report Card Link\"\n[2]: \u003chttps://goreportcard.com/badge/github.com/chensanle/sliset\u003e \"Go Report Card Badge\"\n[3]: \u003chttps://pkg.go.dev/github.com/chensanle/sliset?tab=doc\u003e \"Doc of Sliset Link\"\n[4]: \u003chttps://img.shields.io/badge/go.dev-doc-007d9c?style=flat-square\u0026logo=read-the-docs\u003e \"Doc of Sliset Badge\"\n\n[5]: \u003chttps://codecov.io/gh/chensanle/sliset\u003e \"Codecov Link\"\n[6]: \u003chttps://codecov.io/gh/chensanle/sliset/branch/main/graph/badge.svg?token=BAR2JNMTUJ\u003e \"Codecov Badge\"\n\n[7]: \u003chttps://github.com/chensanle/sliset/actions/workflows/golangci-lint.yml\u003e \"Link\"\n[8]: \u003chttps://github.com/chensanle/sliset/actions/workflows/golangci-lint.yml/badge.svg\u003e \"Badge\"","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchensanle%2Fsliset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchensanle%2Fsliset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchensanle%2Fsliset/lists"}