{"id":18027770,"url":"https://github.com/sj14/csvutil","last_synced_at":"2025-10-04T02:54:34.992Z","repository":{"id":87637706,"uuid":"243842462","full_name":"sj14/csvutil","owner":"sj14","description":"📋 Handling CSV data in Go with ease.","archived":false,"fork":false,"pushed_at":"2021-06-23T08:59:44.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-13T09:30:49.561Z","etag":null,"topics":["csv","go","golang","helper"],"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/sj14.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-02-28T19:47:34.000Z","updated_at":"2022-03-10T21:37:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"940bebe6-e7cf-471b-9245-b406a5bc513f","html_url":"https://github.com/sj14/csvutil","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sj14/csvutil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sj14%2Fcsvutil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sj14%2Fcsvutil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sj14%2Fcsvutil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sj14%2Fcsvutil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sj14","download_url":"https://codeload.github.com/sj14/csvutil/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sj14%2Fcsvutil/sbom","scorecard":{"id":828545,"data":{"date":"2025-08-11","repo":{"name":"github.com/sj14/csvutil","commit":"8d54ec1076003e2806435d29a91cff82e9b38113"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/30 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":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/sj14/csvutil/go.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/sj14/csvutil/go.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 goCommand 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":"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":"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":"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","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":"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":"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":"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 'main'"],"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-23T17:07:48.601Z","repository_id":87637706,"created_at":"2025-08-23T17:07:48.601Z","updated_at":"2025-08-23T17:07:48.601Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278258294,"owners_count":25957281,"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-04T02:00:05.491Z","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":["csv","go","golang","helper"],"created_at":"2024-10-30T08:12:29.528Z","updated_at":"2025-10-04T02:54:34.963Z","avatar_url":"https://github.com/sj14.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# csvutil\n\n[![GoDoc](https://godoc.org/github.com/sj14/csvutil?status.png)](https://godoc.org/github.com/sj14/csvutil)\n[![Go Report Card](https://goreportcard.com/badge/github.com/sj14/csvutil)](https://goreportcard.com/report/github.com/sj14/csvutil)\n![Action](https://github.com/sj14/csvutil/workflows/Go/badge.svg)\n\n## Installation\n\n```bash\ngo get -u github.com/sj14/csvutil\n```\n\n## Examples\n\nFor all options please check the godoc. The examples ignore all error handling!\n\n---\n\n### Create a new dataset\n\nAll datasets should contain a header for further processing.\n\n```go\nrecords := [][]string{\n    {\"first_name\", \"last_name\", \"username\"},\n    {\"Rob\", \"Pike\", \"rob\"},\n    {\"Ken\", \"Thompson\", \"ken\"},\n    {\"Robert\", \"Griesemer\", \"gri\"},\n}\n\nds := csvutil.New(records)\n```\n\n### Add a new row\n\n```go\nds.AddRow([]string{\"my first name\", \"my last name\", \"my nick\"})\n```\n\n```text\nfirst_name,last_name,username\nRob,Pike,rob\nKen,Thompson,ken\nRobert,Griesemer,gri\nmy first name,my last name,my nick\n```\n\n### Add multiple rows\n\n```go\nds.AddRows([][]string{\n    {\"my first name 0\", \"my last name 0\", \"my nick 0\"},\n    {\"my first name 1\", \"my last name 1\", \"my nick 1\"},\n    {\"my first name 2\", \"my last name 2\", \"my nick 2\"},\n})\n```\n\n```text\nfirst_name,last_name,username\nRob,Pike,rob\nKen,Thompson,ken\nRobert,Griesemer,gri\nmy first name 0,my last name 0,my nick 0\nmy first name 1,my last name 1,my nick 1\nmy first name 2,my last name 2,my nick 2\n```\n\n### Add a new column at index 1\n\n```go\nds.AddCol([]string{\"column_headline\", \"my row 1\", \"my row 2\", \"my row 3\"}, 1)\nds.Write(os.Stdout)\n```\n\n```text\nfirst_name,column_headline,last_name,username\nRob,my row 1,Pike,rob\nKen,my row 2,Thompson,ken\nRobert,my row 3,Griesemer,gri\n```\n\n### Get Column\n\n```go\nlastNames, _ := ds.GetCol(\"last_name\")\nfmt.Println(lastNames)\n````\n\n```text\n[last_name Pike Thompson Griesemer]\n```\n\n### Rename Column\n\n```go\nds.RenameCol(\"username\", \"nick\")\n```\n\n```text\nfirst_name,last_name,nick\nRob,Pike,rob\nKen,Thompson,ken\nRobert,Griesemer,gri\n```\n\n### Move Column\n\n```\nds.MoveCol(\"first_name\", 1)\n```\n\n```\nlast_name,first_name,nick\nPike,Rob,rob\nThompson,Ken,ken\nGriesemer,Robert,gri\n```\n\n### Delete Column\n\n```go\nds.DeleteCol(\"first_name\")\n```\n\n```text\nlast_name,nick\nPike,rob\nThompson,ken\nGriesemer,gri\n```\n\n### Modify Column\n\n```go\naddRowNumber := func(val string, i int) string { return fmt.Sprintf(\"%v (%v)\", val, i) }\nds.ModifyCol(\"first_name\", addRowNumber)\nds.Write(os.Stdout)\n```\n\n```text\nfirst_name,last_name,username\nRob (1),Pike,rob\nKen (2),Thompson,ken\nRobert (3),Griesemer,gri\n```\n\n### Write the dataset\n\n```go\nds.Write(os.Stdout)\n```\n\n```text\nfirst_name,last_name,username\nRob,Pike,rob\nKen,Thompson,ken\nRobert,Griesemer,gri\n```\n\n#### Write options\n\n```go\nds.Write(os.Stdout, csvutil.Delimiter('|'), csvutil.UseCLRF(true))\n```\n\n```text\nfirst_name|last_name|username\nRob|Pike|rob\nKen|Thompson|ken\nRobert|Griesemer|gri\n```\n\n### Get dataset as [][]string\n\n```go\nfmt.Println(ds.Raw())\n```\n\n```text\n[[first_name last_name username] [Rob Pike rob] [Ken Thompson ken] [Robert Griesemer gri]]\n```\n\n### Compare two (raw) datasets\n\n```go\na := [][]string{\n    {\"a\", \"b\", \"c\"},\n    {\"d\", \"e\", \"f\"},\n}\n\nb := [][]string{\n    {\"g\", \"h\", \"i\"},\n    {\"j\", \"k\", \"l\"},\n}\n\nresult := csvutil.Equals(a, b)\nfmt.Println(result)\n```\n\n```text\nfalse\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsj14%2Fcsvutil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsj14%2Fcsvutil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsj14%2Fcsvutil/lists"}