{"id":20761708,"url":"https://github.com/s0rg/array2d","last_synced_at":"2026-05-23T03:35:31.724Z","repository":{"id":64300143,"uuid":"570572578","full_name":"s0rg/array2d","owner":"s0rg","description":"Generic 2D array","archived":false,"fork":false,"pushed_at":"2026-01-14T22:06:46.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-27T03:58:22.171Z","etag":null,"topics":["2d-array","generic","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/s0rg.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-11-25T14:11:51.000Z","updated_at":"2025-04-25T11:22:24.000Z","dependencies_parsed_at":"2024-11-17T10:26:56.910Z","dependency_job_id":"85eb3e92-7256-4cfb-813f-39b35a3bf36d","html_url":"https://github.com/s0rg/array2d","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/s0rg/array2d","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s0rg%2Farray2d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s0rg%2Farray2d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s0rg%2Farray2d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s0rg%2Farray2d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s0rg","download_url":"https://codeload.github.com/s0rg/array2d/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s0rg%2Farray2d/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33381989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T01:21:08.577Z","status":"online","status_checked_at":"2026-05-23T02:00:05.530Z","response_time":53,"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":["2d-array","generic","golang"],"created_at":"2024-11-17T10:25:24.149Z","updated_at":"2026-05-23T03:35:26.903Z","avatar_url":"https://github.com/s0rg.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PkgGoDev](https://pkg.go.dev/badge/github.com/s0rg/array2d)](https://pkg.go.dev/github.com/s0rg/array2d)\n[![License](https://img.shields.io/github/license/s0rg/array2d)](https://github.com/s0rg/array2d/blob/master/LICENSE)\n[![Go Version](https://img.shields.io/github/go-mod/go-version/s0rg/array2d)](go.mod)\n[![Tag](https://img.shields.io/github/v/tag/s0rg/array2d?sort=semver)](https://github.com/s0rg/array2d/tags)\n\n[![CI](https://github.com/s0rg/array2d/workflows/ci/badge.svg)](https://github.com/s0rg/array2d/actions?query=workflow%3Aci)\n[![Go Report Card](https://goreportcard.com/badge/github.com/s0rg/array2d)](https://goreportcard.com/report/github.com/s0rg/array2d)\n[![Maintainability](https://qlty.sh/badges/07ef5116-fc80-4eea-9c04-769a32323112/maintainability.svg)](https://qlty.sh/gh/s0rg/projects/array2d)\n[![Code Coverage](https://qlty.sh/badges/07ef5116-fc80-4eea-9c04-769a32323112/test_coverage.svg)](https://qlty.sh/gh/s0rg/projects/array2d)\n![Issues](https://img.shields.io/github/issues/s0rg/array2d)\n\n# array2d\n\nGeneric 2D array\n\n\n# features\n\n- zero-alloc\n- 100% test coverage\n\n\n# example\n\n```go\nimport (\n    \"fmt\"\n\n    \"github.com/s0rg/array2d\"\n)\n\nfunc main() {\n    // create new 2D array with given type and dimensions (width x height)\n    a := array2d.New[int](15, 20)\n\n    // fill with ones\n    a.Fill(func() (value int) {\n        return 1\n    })\n\n    // set value at given coords\n    a.Set(1, 2, 100)\n\n    // get values\n    t1, ok := a.Get(1, 1)\n    if !ok {\n        panic(\"nothing at 1x1\")\n    }\n\n    t2, ok := a.Get(1, 2)\n    if !ok {\n        panic(\"nothing at 1x2\")\n    }\n\n    fmt.Println(t1, t2) // should print: 1, 100\n}\n```\n\n\n# benchmarks\n\n```\ngoos: linux\ngoarch: amd64\npkg: github.com/s0rg/array2d\ncpu: AMD Ryzen 5 5500U with Radeon Graphics\nBenchmarkArray/Set-12           1000000000         1.002 ns/op        0 B/op          0 allocs/op\nBenchmarkArray/Get-12           927178446          1.250 ns/op        0 B/op          0 allocs/op\nBenchmarkArray/Iter-12          39491674           30.68 ns/op        0 B/op          0 allocs/op\nBenchmarkArray/Fill-12          20840200           56.84 ns/op        0 B/op          0 allocs/op\nPASS\nok      github.com/s0rg/array2d 4.897s\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs0rg%2Farray2d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs0rg%2Farray2d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs0rg%2Farray2d/lists"}