{"id":42592726,"url":"https://github.com/gokultp/go-envparser","last_synced_at":"2026-01-28T23:31:33.469Z","repository":{"id":44518106,"uuid":"203043340","full_name":"gokultp/go-envparser","owner":"gokultp","description":"a go generator based env to go-struct decoder.","archived":false,"fork":false,"pushed_at":"2022-02-10T00:56:33.000Z","size":30,"stargazers_count":15,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-19T06:54:30.710Z","etag":null,"topics":["environment-variables","generator","go","golang","hacktoberfest","hacktoberfest2020","struct"],"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/gokultp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-18T18:43:07.000Z","updated_at":"2023-12-03T13:45:11.000Z","dependencies_parsed_at":"2022-09-21T05:20:52.512Z","dependency_job_id":null,"html_url":"https://github.com/gokultp/go-envparser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gokultp/go-envparser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokultp%2Fgo-envparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokultp%2Fgo-envparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokultp%2Fgo-envparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokultp%2Fgo-envparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gokultp","download_url":"https://codeload.github.com/gokultp/go-envparser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokultp%2Fgo-envparser/sbom","scorecard":{"id":434321,"data":{"date":"2025-08-11","repo":{"name":"github.com/gokultp/go-envparser","commit":"0a897ee86128cc09a98f67888a3328d05ecc7201"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/25 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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/greetings.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":"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":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":"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":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/greetings.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/gokultp/go-envparser/greetings.yml/master?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction 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":"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: 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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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-19T04:13:05.066Z","repository_id":44518106,"created_at":"2025-08-19T04:13:05.067Z","updated_at":"2025-08-19T04:13:05.067Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28855111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T22:56:21.783Z","status":"ssl_error","status_checked_at":"2026-01-28T22:56:00.861Z","response_time":57,"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":["environment-variables","generator","go","golang","hacktoberfest","hacktoberfest2020","struct"],"created_at":"2026-01-28T23:31:33.390Z","updated_at":"2026-01-28T23:31:33.463Z","avatar_url":"https://github.com/gokultp.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-envparser\n\n## Overview [![GoDoc](https://godoc.org/github.com/gokultp/go-envparser?status.svg)](https://godoc.org/github.com/gokultp/go-envparser) [![Code Climate](https://codeclimate.com/github/gokultp/go-envparser/badges/gpa.svg)](https://codeclimate.com/github/gokultp/go-envparser) [![Go Report Card](https://goreportcard.com/badge/github.com/gokultp/go-envparser)](https://goreportcard.com/report/github.com/gokultp/go-envparser)\n\n`go-envparser` generates static `DecodeEnv`  functions for structures  in Go to decode environment variables,  will implement the interface [Decoder](./pkg/envdecoder/idecoder.go). The generated functions reduce the reliance upon runtime reflection to do serialization.\n\n\n## Getting Started\n\n### Installation\n\n```shell\ngit clone https://github.com/gokultp/go-envparser.git\ncd go-envparser\nmake\n\n#check if the command is working\nenvparser version\n```\nshould get an output in the following format\n```\nVersion : V0.1.0\nMinVersion : e3a5a007b94f51f46a64853f308e5a24daf98892\nBuildTime : 2019-08-19T00:56:29+0530\n```\n### Commands\n```bash\nenvparser generate -s \u003cstructname\u003e -f \u003cfilename\u003e\n```\nIt will generate a file with name `\u003cstructname\u003edecoder.go`  (Lowercase) consist of a `DecodeEnv` function which will be implementing the interface  [Decoder](./pkg/envdecoder/idecoder.go).\n### Example \n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/gokultp/go-envparser/pkg/envdecoder\"\n)\n\n// Add go generate commands\n//go:generate envparser generate -t GoEnv -f $GOFILE\n// Dont forget to do goimport on generated files.\n//go:generate goimports -w goenvdecoder.go\ntype GoEnv struct {\n\tPaths  Path\n\tGoRoot string `env:\"GOROOT\"`\n}\n\n//go:generate envparser generate -t Path -f $GOFILE\n// Dont forget to do goimport on generated files.\n//go:generate goimports -w pathdecoder.go\ntype Path struct {\n\tSystem []string `env:\"PATH\"`\n\tGo     string   `env:\"GOPATH\"`\n}\n\nfunc main() {\n\tenv := GoEnv{}\n\tif err := envdecoder.Decode(\u0026env); err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Printf(\"%#v\", env)\n}\n\n```\n\nHere in the above file I have used go generate flags, will execute all the needed commands( envparser generate \u0026\u0026 goimports) in a single `go generate` command.\n\nSo here to generate the code execute\n```bash\ngo generate\n```\n\nto run the code execute\n``` bash \ngo build\n./\u003cbinary\u003e\n```\n\n## License\n\n`go-envparser` is licensed under the [MIT License](./LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgokultp%2Fgo-envparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgokultp%2Fgo-envparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgokultp%2Fgo-envparser/lists"}