{"id":19883146,"url":"https://github.com/dmitrymomot/go-env","last_synced_at":"2026-05-10T21:53:18.945Z","repository":{"id":57569954,"uuid":"345078693","full_name":"dmitrymomot/go-env","owner":"dmitrymomot","description":"Helpers to work with environment variables.","archived":false,"fork":false,"pushed_at":"2023-02-16T10:09:10.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-11T18:30:05.680Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmitrymomot.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-06T11:38:13.000Z","updated_at":"2024-08-07T18:58:05.000Z","dependencies_parsed_at":"2024-11-12T17:19:59.719Z","dependency_job_id":"2329b29a-9f4d-4b85-a90f-134778e4509e","html_url":"https://github.com/dmitrymomot/go-env","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitrymomot%2Fgo-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitrymomot%2Fgo-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitrymomot%2Fgo-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitrymomot%2Fgo-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmitrymomot","download_url":"https://codeload.github.com/dmitrymomot/go-env/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241311552,"owners_count":19942194,"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","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":"2024-11-12T17:19:29.408Z","updated_at":"2026-05-10T21:53:13.911Z","avatar_url":"https://github.com/dmitrymomot.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-env\n    \n[![Go Reference](https://pkg.go.dev/badge/github.com/dmitrymomot/go-env.svg)](https://pkg.go.dev/github.com/dmitrymomot/go-env)\n[![Go Report Card](https://goreportcard.com/badge/github.com/dmitrymomot/go-env)](https://goreportcard.com/report/github.com/dmitrymomot/go-env)\n[![Tests](https://github.com/dmitrymomot/go-env/actions/workflows/tests.yml/badge.svg)](https://github.com/dmitrymomot/go-env/actions/workflows/tests.yml)\n\nHelpers to work with environment variables.\n\n\n## Usage Example\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"net/http\"\n    \"github.com/dmitrymomot/go-env\"\n    \"github.com/go-chi/chi\"\n)\n\nvar (\n    httpPort = env.MustInt(\"HTTP_PORT\") // required env variable, throws fatal error if it empty\n    healthEndpoint = env.GetString(\"HEALTH_ENDPOINT\", \"/health\") // optional env variable with fallback value\n)\n\nfunc main() {\n    r := chi.NewRouter()\n    r.Get(healthEndpoint, func(w http.ResponseWriter, r *http.Request) {\n        w.WriteHeader(http.StatusNoContent)\n    })\n    http.ListenAndServe(fmt.Sprintf(\":%d\", httpPort), r)\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitrymomot%2Fgo-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmitrymomot%2Fgo-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitrymomot%2Fgo-env/lists"}