{"id":41395805,"url":"https://github.com/scottdware/go-easycsv","last_synced_at":"2026-01-23T12:53:23.551Z","repository":{"id":59185481,"uuid":"95909932","full_name":"scottdware/go-easycsv","owner":"scottdware","description":"Package easycsv provides an easy to use wrapper for reading from and writing to CSV files.","archived":false,"fork":false,"pushed_at":"2022-09-12T23:04:46.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-08-12T02:29:58.346Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scottdware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-30T17:27:10.000Z","updated_at":"2022-09-12T20:55:56.000Z","dependencies_parsed_at":"2023-01-18T05:30:44.285Z","dependency_job_id":null,"html_url":"https://github.com/scottdware/go-easycsv","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/scottdware/go-easycsv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottdware%2Fgo-easycsv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottdware%2Fgo-easycsv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottdware%2Fgo-easycsv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottdware%2Fgo-easycsv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scottdware","download_url":"https://codeload.github.com/scottdware/go-easycsv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottdware%2Fgo-easycsv/sbom","scorecard":{"id":805636,"data":{"date":"2025-08-11","repo":{"name":"github.com/scottdware/go-easycsv","commit":"086d7a1ee17ebe63e1f33958bea3668f322fdccf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/24 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":"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":"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":"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"}},{"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":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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 '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"}}]},"last_synced_at":"2025-08-23T11:41:06.030Z","repository_id":59185481,"created_at":"2025-08-23T11:41:06.030Z","updated_at":"2025-08-23T11:41:06.030Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28692249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T11:01:27.039Z","status":"ssl_error","status_checked_at":"2026-01-23T11:00:26.909Z","response_time":59,"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":[],"created_at":"2026-01-23T12:53:23.428Z","updated_at":"2026-01-23T12:53:23.531Z","avatar_url":"https://github.com/scottdware.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## go-easycsv\r\n\r\nThis package is an easy to use wrapper around reading from, and writing to CSV files.\r\n\r\n### Examples\r\n\r\n#### Reading From a CSV File\r\n\r\nLet's assume we have a CSV file named \"dogs.csv\" with the following content:\r\n\r\n```\r\nGerman Shepherd,Male,3,Black and Tan\r\nShiba-Inu,Female,13,Black and Tan\r\nShepherd/Husky,Male,11,Tan\r\n```\r\n\r\nTo read each row, we use the `Open()` function. This returns a `[][]string` of the contents you can easily iterate over.\r\n\r\n\u003e**NOTE**: Lines beginning with a `#` (comment) will be ignored!\r\n\r\n```Go\r\npackage main\r\n\r\nimport (\r\n    \"fmt\"\r\n    \"github.com/scottdware/go-easycsv\"\r\n)\r\n\r\nfunc main() {\r\n    dogs, err := easycsv.Open(\"dogs.csv\")\r\n    if err != nil {\r\n        fmt.Println(err)\r\n    }\r\n\r\n    for _, dog := range dogs {\r\n        // Find out how many columns we have in each row\r\n        cols := len(dog)\r\n\r\n        // Print the number of columns for each row, as well as the entire row's contents\r\n        fmt.Printf(\"Columns: %d, Data: %+v\\n\", cols, dog)\r\n    }\r\n}\r\n```\r\n\r\nThis will output the following:\r\n\r\n```\r\nColumns: 4, Data: [German Shepherd Male 3 Black and Tan]\r\nColumns: 4, Data: [Shiba-Inu Female 13 Black and Tan]\r\nColumns: 4, Data: [Shepherd/Husky Male 11 Tan]\r\n```\r\n\r\nRemember that column numbering starts at 0, so if you want to assign each column to a variable name, you can do so as follows:\r\n\r\n```Go\r\nfor _, dog := range dogs {\r\n    // Assign variables for each column\r\n    breed := dog[0]\r\n    sex := dog[1]\r\n    age := dog[2]\r\n    color := dog[3]\r\n\r\n    // Print the number of columns for each row, as well as the entire row's contents\r\n    fmt.Printf(\"Breed: %s, Sex: %s, Age: %s, Color: %s\\n\", breed, sex, age, color)\r\n}\r\n```\r\n\r\nThe above will output the following:\r\n\r\n```\r\nBreed: German Shepherd, Sex: Male, Age: 3, Color: Black and Tan\r\nBreed: Shiba-Inu, Sex: Female, Age: 13, Color: Black and Tan\r\nBreed: Shepherd/Husky, Sex: Male, Age: 11, Color: Tan\r\n```\r\n\r\n#### Creating and Writing to CSV Files\r\n\r\nTo create a new CSV file, you can use the `NewCSV()` function. This only takes one parameter, which is the name/path to the CSV file. You then\r\ncan use the `Write()` function to create content. Once you are finished writing to the file (buffer), you must call the `End()` function to actually write the contents\r\nto the file and close it from further writing.\r\n\r\n```Go\r\npackage main\r\n\r\nimport (\r\n\t\"fmt\"\r\n\r\n\t\"github.com/scottdware/go-easycsv\"\r\n)\r\n\r\nfunc main() {\r\n    dogsCSV, err := easycsv.NewCSV(\"dogs.csv\")\r\n    if err != nil {\r\n        fmt.Println(err)\r\n    }\r\n\r\n    dogsCSV.Write(\"German Shepherd,Male,3,Black and Tan\\n\")\r\n    dogsCSV.Write(\"Shiba-Inu,Female,13,Black and Tan\\n\")\r\n    dogsCSV.Write(\"Shepherd/Husky,Male,11,Tan\\n\")\r\n    dogsCSV.End()\r\n}\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottdware%2Fgo-easycsv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscottdware%2Fgo-easycsv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottdware%2Fgo-easycsv/lists"}