{"id":36800944,"url":"https://github.com/tsivinsky/goenv","last_synced_at":"2026-01-12T13:34:08.076Z","repository":{"id":65732899,"uuid":"598138649","full_name":"tsivinsky/goenv","owner":"tsivinsky","description":"Load env variables to struct","archived":false,"fork":false,"pushed_at":"2025-03-20T21:09:51.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-20T22:23:54.580Z","etag":null,"topics":["env","go","goenv"],"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/tsivinsky.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-06T13:39:31.000Z","updated_at":"2025-03-20T21:09:46.000Z","dependencies_parsed_at":"2024-08-17T03:31:17.989Z","dependency_job_id":null,"html_url":"https://github.com/tsivinsky/goenv","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/tsivinsky/goenv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsivinsky%2Fgoenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsivinsky%2Fgoenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsivinsky%2Fgoenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsivinsky%2Fgoenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsivinsky","download_url":"https://codeload.github.com/tsivinsky/goenv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsivinsky%2Fgoenv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28339205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"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":["env","go","goenv"],"created_at":"2026-01-12T13:34:07.980Z","updated_at":"2026-01-12T13:34:08.055Z","avatar_url":"https://github.com/tsivinsky.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# goenv\n\n## Install\n\n```bash\ngo get -u github.com/tsivinsky/goenv\n```\n\n## Example\n\n```go\npackage main\n\nimport (\n    \"github.com/tsivinsky/goenv\"\n)\n\ntype Env struct {\n    APP_NAME string `env:\"APP_NAME\"`\n}\n\nfunc main() {\n    env := new(Env)\n\n    goenv.Load(env)\n}\n```\n\nUnder the hood, `goenv` use [godotenv](https://github.com/joho/godotenv) for loading variables from .env file\n\n## Rules\n\n### `required`\n\n```go\ntype Env struct {\n    VAR string `env:\"VAR,required\"`\n}\n```\n\nThis will result in runtime error if VAR env doesn't exist\n\n### `default=`\n\n```go\ntype Env struct {\n    VAR string `env:\"VAR,default=var`\n}\n```\n\nThis will set value for `Env.VAR` as `var` if no other value is provided (including empty string)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsivinsky%2Fgoenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsivinsky%2Fgoenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsivinsky%2Fgoenv/lists"}