{"id":40767242,"url":"https://github.com/trimmer-io/go-csv","last_synced_at":"2026-01-21T18:32:49.079Z","repository":{"id":33862604,"uuid":"90555105","full_name":"trimmer-io/go-csv","owner":"trimmer-io","description":"A pure Go CSV file transcoder","archived":false,"fork":false,"pushed_at":"2024-08-13T22:29:00.000Z","size":47,"stargazers_count":12,"open_issues_count":5,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-15T05:18:37.468Z","etag":null,"topics":["csv","csv-parser","go"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trimmer-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-05-07T19:04:44.000Z","updated_at":"2025-02-06T02:04:08.000Z","dependencies_parsed_at":"2024-06-20T15:35:29.876Z","dependency_job_id":"45a13104-71b9-43f9-904a-8032652d388b","html_url":"https://github.com/trimmer-io/go-csv","commit_stats":null,"previous_names":["echa/go-csv"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/trimmer-io/go-csv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trimmer-io%2Fgo-csv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trimmer-io%2Fgo-csv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trimmer-io%2Fgo-csv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trimmer-io%2Fgo-csv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trimmer-io","download_url":"https://codeload.github.com/trimmer-io/go-csv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trimmer-io%2Fgo-csv/sbom","scorecard":{"id":898712,"data":{"date":"2025-08-11","repo":{"name":"github.com/trimmer-io/go-csv","commit":"40d7c6c561306b90d3453b0b461f0763f71dabb2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"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/21 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":"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":"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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: 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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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-24T14:42:44.841Z","repository_id":33862604,"created_at":"2025-08-24T14:42:44.841Z","updated_at":"2025-08-24T14:42:44.841Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28639283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T18:04:35.752Z","status":"ssl_error","status_checked_at":"2026-01-21T18:03:55.054Z","response_time":86,"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","go"],"created_at":"2026-01-21T18:32:48.395Z","updated_at":"2026-01-21T18:32:49.074Z","avatar_url":"https://github.com/trimmer-io.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"go-csv\n===========\n\n[![GoDoc](https://godoc.org/github.com/trimmer-io/go-csv/timecode?status.svg)](https://godoc.org/github.com/trimmer-io/go-csv)\n\n\ngo-csv is a [Go](http://golang.org/) package for encoding and decoding CSV-structured textfiles to/from arbitrary Go types.\n\nFeatures\n--------\n\n- [RFC 4180](https://tools.ietf.org/rfc/rfc4180.txt) compliant CSV reader and writer\n- MarshalCSV/UnmarshalCSV interfaces\n- mapping to strings, integers, floats and boolean values\n- bulk or stream processing\n- custom separator and comment characters\n- optional whitespace trimming for headers and string values\n- `any` support for reading unknown CSV fields\n\n### TODO\n\n- parse quoted strings containing newline and comma\n- quote strings containing comma, newline and double-quotes on output\n\nDocumentation\n-------------\n\n- [API Reference](http://godoc.org/github.com/trimmer-io/go-csv)\n- [FAQ](https://github.com/github.com/trimmer-io/go-csv/wiki/FAQ)\n\nInstallation\n------------\n\nInstall go-csv using the \"go get\" command:\n\n    go get github.com/trimmer-io/go-csv\n\nThe Go distribution is go-csv's only dependency.\n\nExamples\n--------\n\n### Reading a well defined CSV file\n\nThis example assumes your CSV file contains a header who's values match the struct tags defined on the Go type FrameInfo. CSV fields that are undefined in the type are ignored.\n\n```\nimport \"github.com/trimmer-io/go-csv\"\n\ntype FrameInfo struct {\n\tActiveImageHeight  int      `csv:\"Active Image Height\"`\n\tActiveImageLeft    int      `csv:\"Active Image Left\"`\n\tActiveImageTop     int      `csv:\"Active Image Top\"`\n\tActiveImageWidth   int      `csv:\"Active Image Width\"`\n\tCameraClipName     string   `csv:\"Camera Clip Name\"`\n\tCameraRoll         float32  `csv:\"Camera Roll\"`\n\tCameraTilt         float32  `csv:\"Camera Tilt\"`\n\tMasterTC           string   `csv:\"Master TC\"`\n\tMasterTCFrameCount int      `csv:\"Master TC Frame Count\"`\n\tSensorFPS          float32  `csv:\"Sensor FPS\"`\n}\n\ntype FrameSequence []*FrameInfo\n\nfunc ReadFile(path string) (FrameSequence, error) {\n\tb, err := ioutil.ReadFile(path)\n\tif err != nil {\n\t\treturn nil, err\n    \t}\n\tseq := make(FrameSequence, 0)\n\tif err := csv.Unmarshal(b, \u0026seq); err != nil {\n\t\treturn nil, err\n\t}\n\treturn seq, nil\n}\n```\n\n### Fail when encountering unknown CSV fields\n```\nfunc ReadFileUnknown(path string) (FrameSequence, error) {\n\tf, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n    \tdefer f.Close()\n\tdec := csv.NewDecoder(f).SkipUnknown(false)\n\tc := make(FrameSequence, 0)\n\tif err := dec.Decode(\u0026c); err != nil {\n\t\treturn nil, err\n    \t}\n\treturn c, nil\n}\n```\n\n### Parsing an unknown CSV file into a slice of maps\n```\ntype GenericRecord struct {\n\tRecord map[string]string `csv:,any`\n}\n\ntype GenericCSV []GenericRecord\n\nfunc ReadFileIntoMap(path string) (GenericCSV, error) {\n\tf, err := os.Open(path)\n\tif err != nil {\n\t    return nil, err\n    \t}\n    \tdefer f.Close()\n\tdec := csv.NewDecoder(f)\n\tc := make(GenericCSV, 0)\n\tif err := dec.Decode(\u0026c); err != nil {\n\t    return nil, err\n    \t}\n\treturn c, nil\n}\n```\n\n### Stream-process CSV input\n```\nfunc ReadStream(r io.Reader) error {\n\tdec := csv.NewDecoder(r)\n\n\t// read and decode the file header\n\tline, err := dec.ReadLine()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err = dec.DecodeHeader(line); err != nil {\n\t\treturn err\n\t}\n\n\t// loop until EOF (i.e. dec.ReadLine returns an empty line and nil error);\n\t// any other error during read will result in a non-nil error\n\tfor {\n\t\t// read the next line from stream\n\t\tline, err = dec.ReadLine()\n\n\t\t// check for read errors other than EOF\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// check for EOF condition\n\t\tif line == \"\" {\n\t\t\tbreak\n\t\t}\n\n\t\t// decode the record\n\t\tv := \u0026FrameInfo{}\n\t\tif err = dec.DecodeRecord(v, line); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// process the record here\n\t\tProcess(v)\n\t}\n\treturn nil\n}\n```\n\n\nContributing\n------------\n\nSee [CONTRIBUTING.md](https://github.com/trimmer-io/go-csv/blob/master/.github/CONTRIBUTING.md).\n\n\nLicense\n-------\n\ngo-csv is available under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrimmer-io%2Fgo-csv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrimmer-io%2Fgo-csv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrimmer-io%2Fgo-csv/lists"}