{"id":40935523,"url":"https://github.com/ancreny/env-parser","last_synced_at":"2026-01-22T04:15:39.168Z","repository":{"id":200760682,"uuid":"706180846","full_name":"anCreny/env-parser","owner":"anCreny","description":"Simple parser to get values from environment","archived":false,"fork":false,"pushed_at":"2023-12-09T23:01:02.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-01-25T14:31:42.628Z","etag":null,"topics":["environment-variables","golang","golang-package","parser"],"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/anCreny.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-10-17T13:06:35.000Z","updated_at":"2023-10-17T16:25:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"f89a84d0-4457-4236-ae62-f2ceeb91c34b","html_url":"https://github.com/anCreny/env-parser","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.25,"last_synced_commit":"0ecfea0e4c8b36c5f7fd48201bbc2f39f01ad3e7"},"previous_names":["ancreny/env-parser"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/anCreny/env-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anCreny%2Fenv-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anCreny%2Fenv-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anCreny%2Fenv-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anCreny%2Fenv-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anCreny","download_url":"https://codeload.github.com/anCreny/env-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anCreny%2Fenv-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28653973,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"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","golang","golang-package","parser"],"created_at":"2026-01-22T04:15:38.600Z","updated_at":"2026-01-22T04:15:39.163Z","avatar_url":"https://github.com/anCreny.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# env-parser\n\n## About\nThis is a simple parser to run through a struct and get env variables appropriate for 'custom' tag value.\n\n\n## Installing\n```bash\ngo get github.com/anCreny/env-parser\n```\n\n## Usage\nTo use custom tag you should create **EnvParser** first:\n```go\nfunc New(tag string, useName, safe bool) *EnvParser\n```\n* tag - tag name that will be parsed by.\n* useName -  if a field of a structure want to parse doesn't have the tag, you can manage **parser** behaviour:\n  * *true* - **parser** use field name like a tag value.\n  * *false* - ignore field if tag with the given name doesn't exist.\n* safe - getting opportunity to manage fields override. If the specific field has a non-zero value:\n  * *true* - value from env var ___won't___ replace the field value\n  * *false* - value from env var ___will___ replace the field value\n\nThe constructor will return a parser instance of the structure:\n```go\ntype EnvParser struct {\n\ttag string\n\tuseName bool\n}\n```\n\nThe structure has only one simple method:\n```go\nfunc (e *EnvParser) Parse(structure interface{}) error\n```\n\nMethod get in a pointer to a structure you want to parse in, instead you will get an error.\n\n***\n\nYou'r wellcome to contribute and comment it!\n\nLove you \u003c3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fancreny%2Fenv-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fancreny%2Fenv-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fancreny%2Fenv-parser/lists"}