{"id":16095549,"url":"https://github.com/meowgorithm/babyenv","last_synced_at":"2025-09-05T11:09:49.649Z","repository":{"id":48057505,"uuid":"169027368","full_name":"meowgorithm/babyenv","owner":"meowgorithm","description":"Go environment var parsing, for babies","archived":false,"fork":false,"pushed_at":"2021-08-09T15:41:01.000Z","size":26,"stargazers_count":33,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T19:10:01.649Z","etag":null,"topics":["environment-variables","go"],"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/meowgorithm.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}},"created_at":"2019-02-04T04:32:43.000Z","updated_at":"2024-05-16T15:24:54.000Z","dependencies_parsed_at":"2022-08-12T17:40:31.158Z","dependency_job_id":null,"html_url":"https://github.com/meowgorithm/babyenv","commit_stats":null,"previous_names":["magicnumbers/babyenv"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/meowgorithm/babyenv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowgorithm%2Fbabyenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowgorithm%2Fbabyenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowgorithm%2Fbabyenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowgorithm%2Fbabyenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meowgorithm","download_url":"https://codeload.github.com/meowgorithm/babyenv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowgorithm%2Fbabyenv/sbom","scorecard":{"id":636718,"data":{"date":"2025-08-11","repo":{"name":"github.com/meowgorithm/babyenv","commit":"b090f6c7318b1ec83cd4325691bc26d7651931c7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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/29 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":"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":"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":"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":"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-21T09:23:37.230Z","repository_id":48057505,"created_at":"2025-08-21T09:23:37.230Z","updated_at":"2025-08-21T09:23:37.230Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273747790,"owners_count":25160653,"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-09-05T02:00:09.113Z","response_time":402,"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":["environment-variables","go"],"created_at":"2024-10-09T17:06:23.723Z","updated_at":"2025-09-05T11:09:49.602Z","avatar_url":"https://github.com/meowgorithm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Babyenv\n=======\n\n[![GoDoc Badge](https://godoc.org/github.com/meowgorithm/babylogger?status.svg)](http://godoc.org/github.com/meowgorithm/babyenv)\n\nPackage babyenv collects environment variables and places them in corresponding\nstruct fields. It aims to reduce the boilerplate in reading data from the\nenvironment.\n\nThe struct should contain `env` tags indicating the names of corresponding\nenvironment variables. The values of those environment variables will be then\ncollected and placed into the struct. If nothing is found, struct fields will\nbe given their default values (for example, `bool`s will be `false`).\n\n```go\ntype config struct {\n    Name string `env:\"NAME\"`\n}\n```\n\nDefault values can also be provided in the `default` tag.\n\n```go\n    type config struct {\n        Name string `env:\"NAME\" default:\"Jane\"`\n    }\n```\n\nA 'required' flag can also be set in the following format:\n\n```go\n    type config struct {\n        Name string `env:\"NAME,required\"`\n    }\n```\n\nIf a required flag is set the 'default' tag will be ignored.\n\n\n## Example\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"os\"\n    \"github.com/meowgorithm/babyenv\"\n)\n\ntype config struct {\n    Debug   bool   `env:\"DEBUG\"`\n    Port    string `env:\"PORT\" default:\"8000\"`\n    Workers int    `env:\"WORKERS\" default:\"16\"`\n    Name    string `env:\"NAME,required\"`\n}\n\nfunc main() {\n    os.Setenv(\"DEBUG\", \"true\")\n    os.Setenv(\"WORKERS\", \"4\")\n    os.Setenv(\"NAME\", \"Jane\")\n\n    var cfg config\n    if err := babyenv.Parse(\u0026cfg); err != nil {\n        log.Fatalf(\"could not get environment vars: %v\", err)\n    }\n\n    fmt.Printf(\"%b\\n%s\\n%d\\n%s\", cfg.Debug, cfg.Port, cfg.Workers, cfg.Name)\n\n    // Output:\n    // true\n    // 8000\n    // 4\n    // Jane\n}\n```\n\n\n## Supported Types\n\nCurrently, only the following types are supported:\n\n* `string`\n* `bool`\n* `int`\n* `int64`\n* `[]byte`/`[]uint8`\n* `*string`\n* `*bool`\n* `*int`\n* `*int64`\n* `*[]byte`/`*[]uint8`\n\nPull requests are welcome, especially for new types.\n\n\n## Credit\n\nThis is entirely based on [caarlos0][carlos]’s [env][carlosenv] package.\nThis one simply has a slightly different interface, and less functionality.\n\n[carlos]: https://github.com/caarlos0\n[carlosenv]: https://github.com/caarlos0/env\n\n\n## LICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeowgorithm%2Fbabyenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeowgorithm%2Fbabyenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeowgorithm%2Fbabyenv/lists"}