{"id":37175870,"url":"https://github.com/cinar/csv2","last_synced_at":"2026-01-14T20:31:45.677Z","repository":{"id":57596364,"uuid":"375167859","full_name":"cinar/csv2","owner":"cinar","description":"Csv2 is a lightweight Golang module for reading CSV files as individual rows or as a table.","archived":false,"fork":false,"pushed_at":"2021-10-10T19:27:56.000Z","size":6,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-24T21:39:42.863Z","etag":null,"topics":["csv","csv-parser","golang","golang-package"],"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/cinar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-08T23:11:18.000Z","updated_at":"2025-04-17T11:55:30.000Z","dependencies_parsed_at":"2022-09-26T20:01:37.189Z","dependency_job_id":null,"html_url":"https://github.com/cinar/csv2","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cinar/csv2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinar%2Fcsv2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinar%2Fcsv2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinar%2Fcsv2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinar%2Fcsv2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cinar","download_url":"https://codeload.github.com/cinar/csv2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinar%2Fcsv2/sbom","scorecard":{"id":282861,"data":{"date":"2025-08-11","repo":{"name":"github.com/cinar/csv2","commit":"45b76f4070b9ddc322e3859dee8e7a379dadc834"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"Code-Review","score":0,"reason":"Found 0/4 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":"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":"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":"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.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md: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-17T16:22:07.197Z","repository_id":57596364,"created_at":"2025-08-17T16:22:07.202Z","updated_at":"2025-08-17T16:22:07.202Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","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":["csv","csv-parser","golang","golang-package"],"created_at":"2026-01-14T20:31:45.165Z","updated_at":"2026-01-14T20:31:45.670Z","avatar_url":"https://github.com/cinar.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GoDoc](https://godoc.org/github.com/cinar/csv2?status.svg)](https://godoc.org/github.com/cinar/csv2)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Build Status](https://travis-ci.com/cinar/csv2.svg?branch=main)](https://travis-ci.com/cinar/csv2)\n\n# Csv2 Go\n\nCsv2 is a lightweight Golang module for reading CSV files as individual rows or as a table.\n\n## Usage\n\nInstall package.\n\n```bash\ngo get github.com/cinar/csv2\n```\n\nImport Csv2.\n\n```Golang\nimport (\n    \"github.com/cinar/csv2\"\n)\n```\n\n### Reading as individual rows\n\nGiven that the CSV file contains the following columns.\n\n```CSV\ndate,close,high,low,open,volume,adjClose,adjHigh,adjLow,adjOpen,adjVolume,divCash,splitFactor\n2015-09-18 00:00:00+00:00,43.48,43.99,43.33,43.5,63143684,39.5167038561,39.9802162518,39.3803766809,39.534880812800004,63143684,0.0,1.0\n```\n\nDefine a structure for each individual row.\n\n```Golang\n// Daily price structure for each row.\ntype dailyPrice struct {\n\tDate        time.Time `format:\"2006-01-02 15:04:05-07:00\"`\n\tClose       float64\n\tHigh        float64\n\tLow         float64\n\tOpen        float64\n\tVolume      int64\n\tAdjClose    float64\n\tAdjHigh     float64\n\tAdjLow      float64\n\tAdjOpen     float64\n\tAdjVolume   int64\n\tDivCash     float64\n\tSplitFactor float64\n}\n```\n\nCsv2 allows you to associate additional information about the colums through the tags. The following additional information is currently supported.\n\nTag | Description | Example\n--- | --- | ---\nheader | Column header for the field. | `header:\"Date\"`\nformat | Date format for parsing. | `format:\"2006-01-02 15:04:05-07:00\"`\n\nDefine an instance of a slice of row structure.\n\n```Golang\nvar prices []dailyPrice\n```\n\nUse the [ReadRowsFromFile](https://pkg.go.dev/github.com/cinar/csv2#ReadRowsFromFile) function to read the CSV file into the slice.\n\n```Golang\nerr := csv2.ReadRowsFromFile(testFile, true, \u0026prices)\nif err != nil {\n    return err\n}\n```\n\n### Reading as a table\n\nDefine a structure for the table.\n\n```Golang\n// Stock prices structure for all columns.\ntype stockPrices struct {\n\tDate        []time.Time `format:\"2006-01-02 15:04:05-07:00\"`\n\tClose       []float64\n\tHigh        []float64\n\tLow         []float64\n\tOpen        []float64\n\tVolume      []int64\n\tAdjClose    []float64\n\tAdjHigh     []float64\n\tAdjLow      []float64\n\tAdjOpen     []float64\n\tAdjVolume   []int64\n\tDivCash     []float64\n\tSplitFactor []float64\n}\n```\n\nDefine an instance of the table structure.\n\n```Golang\nprices := stockPrices{}\n```\n\nUse the [ReadTableFromFile](https://pkg.go.dev/github.com/cinar/csv2#ReadRowsFromFile) function to read the CSV file into the table.\n\n```Golang\nerr := csv2.ReadTableFromFile(testFile, true, \u0026prices)\nif err != nil {\n    t.Fatal(err)\n}\n```\n\n## License\n\nThe source code is provided under MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcinar%2Fcsv2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcinar%2Fcsv2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcinar%2Fcsv2/lists"}