{"id":18538689,"url":"https://github.com/hatena/godash","last_synced_at":"2026-03-16T22:31:40.560Z","repository":{"id":196167306,"uuid":"694124741","full_name":"hatena/godash","owner":"hatena","description":"Minimal wrapper of samber/lo","archived":false,"fork":false,"pushed_at":"2025-03-17T08:49:33.000Z","size":57,"stargazers_count":14,"open_issues_count":2,"forks_count":2,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-04-10T11:03:28.448Z","etag":null,"topics":["go","golang"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/hatena/godash","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/hatena.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-09-20T11:31:46.000Z","updated_at":"2025-04-04T02:15:55.000Z","dependencies_parsed_at":"2024-04-29T01:28:54.723Z","dependency_job_id":"8b9a5a23-15fe-4610-a2a1-e706959e19ab","html_url":"https://github.com/hatena/godash","commit_stats":null,"previous_names":["hatena/godash"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/hatena/godash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatena%2Fgodash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatena%2Fgodash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatena%2Fgodash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatena%2Fgodash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hatena","download_url":"https://codeload.github.com/hatena/godash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatena%2Fgodash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271159173,"owners_count":24709222,"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-08-19T02:00:09.176Z","response_time":63,"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":["go","golang"],"created_at":"2024-11-06T19:44:43.516Z","updated_at":"2026-03-16T22:31:40.532Z","avatar_url":"https://github.com/hatena.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# godash\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/hatena/godash.svg)](https://pkg.go.dev/github.com/hatena/godash)\n\nhatena/godash is a minimal wrapper of https://github.com/samber/lo.\n\n**Though this repository is still maintained, we strongly recommend to use iter instead.**\n\n## Motivation\n\nhttps://github.com/samber/lo is a nice library, but in some cases teams do not want to have all of the helper functions available. Some helper functions defined in samber/lo are actually already available as part of the official [slices package](https://pkg.go.dev/slices).\n\nhatena/godash is meant to only provide a small portion of samber/lo's functions:\n- functions that are not available via Go's standard library\n- functions that are not \"too much\", such as \"Conditional helpers\" or \"Error handling\"\n\n## Usage\nInstall the package to your repo with `go get`.\n\n```sh\ngo get -u github.com/hatena/godash\n```\n\nSample usage:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/hatena/godash\"\n)\n\nfunc main() {\n\tintegers := []int{0, 1, 1, 3, 2, 1, 1, 0}\n\tfmt.Println(godash.Chunk(integers, 3))\n}\n```\n\nCheck out more examples at [godash package - github.com/hatena/godash - Go Packages](https://pkg.go.dev/github.com/hatena/godash).\n\n### Recommended golangci-lint configuration\nSince this package aims to only present a subset of functions from `samber/lo`, it is recommended to add linter settings to deny importing directly from `samber/lo`. (If you want to use `samber/lo` directly, then there is no meaning to use `hatena/godash`). \n\nBelow is a minimal `.golangci.yml` configuration to deny `samber/lo` imports.\n\n```yml\nlinters:\n  enable:\n    - depguard\n\nlinters-settings:\n  depguard:\n    rules:\n      deny-samber-lo:\n        deny:\n          - pkg: \"github.com/samber/lo\"\n            desc: Use github.com/hatena/godash instead.\n```\n\nOnce you have `.golangci.yml`, make sure to run `golangci-lint` via CI. Below is an example for GitHub Actions.\n\n```yml\nname: CI\n\non:\n  push:\n    branches: main\n  pull_request:\n\npermissions:\n  contents: read\n  pull-requests: read\n\njobs:\n  lint:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-go@v4\n        with:\n          go-version-file: \"go.mod\"\n      - name: golangci-lint\n        uses: golangci/golangci-lint-action@v3\n        with:\n          version: v1.54.2\n          only-new-issues: true\n```\n\nSee [Introduction | golangci-lint](https://golangci-lint.run/) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhatena%2Fgodash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhatena%2Fgodash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhatena%2Fgodash/lists"}