{"id":17978026,"url":"https://github.com/lalabuy948/genvutils","last_synced_at":"2025-04-04T00:23:25.063Z","repository":{"id":55592797,"uuid":"288025798","full_name":"lalabuy948/genvutils","owner":"lalabuy948","description":"Go environment utilities (genvutils) - provides useful environment variables operations","archived":false,"fork":false,"pushed_at":"2020-12-21T10:10:54.000Z","size":31,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T12:19:23.347Z","etag":null,"topics":["dotenv","dotenv-loader","dotenv-parser","golang","golang-library","golang-tools"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/lalabuy948/genvutils","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/lalabuy948.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":["https://www.buymeacoffee.com/lalabuy","https://www.paypal.com/paypalme/lalabuy948"]}},"created_at":"2020-08-16T21:18:13.000Z","updated_at":"2020-12-21T10:10:57.000Z","dependencies_parsed_at":"2022-08-15T03:50:58.260Z","dependency_job_id":null,"html_url":"https://github.com/lalabuy948/genvutils","commit_stats":null,"previous_names":["lalabuy948/gonvutils"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalabuy948%2Fgenvutils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalabuy948%2Fgenvutils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalabuy948%2Fgenvutils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalabuy948%2Fgenvutils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lalabuy948","download_url":"https://codeload.github.com/lalabuy948/genvutils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247099343,"owners_count":20883362,"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":["dotenv","dotenv-loader","dotenv-parser","golang","golang-library","golang-tools"],"created_at":"2024-10-29T17:30:47.076Z","updated_at":"2025-04-04T00:23:25.046Z","avatar_url":"https://github.com/lalabuy948.png","language":"Go","funding_links":["https://www.buymeacoffee.com/lalabuy","https://www.paypal.com/paypalme/lalabuy948"],"categories":[],"sub_categories":[],"readme":"# genvutils  [![Go Report Card](https://goreportcard.com/badge/github.com/lalabuy948/genvutils)](https://goreportcard.com/report/github.com/lalabuy948/genvutils)  [![Build Status](https://github.com/lalabuy948/genvutils/workflows/build/badge.svg)](https://github.com/lalabuy948/genvutils/actions) [![made-with-Go](https://img.shields.io/badge/Made%20with-Go-1f425f.svg)](http://golang.org)\n\n\u003e Package genvutils provides useful environment operations\n\n## Funcs\n\n- `IsProduction`, `IsDevelopment` and `IsTesting` checks for `ENVIRONMENT` dot env value.\n- `GetEnv` gets env value or fallback which goes as second function argument.\n- `Parse` will fill given struct with env values or with fallbacks. (see examples folder)\n```go\n\ttype serverConfig struct {\n\t\tServerPort string `genv:\"SERVER_PORT,8080\"`\n\t\tMongoUrl   string `genv:\"MONGO_URL,mongodb://localhost:27017\"`\n\t}\n```\n- `Load` will load dotenv file. You can provide file name via argument otherwise it will load dot environment file by priority list.\nFirst found - first load. Priority list:\n```sh\n.env.production.local\n.env.test.local\n.env.development.local\n.env.production\n.env.test\n.env.development\n.env.local !!! will override existing values.\n.env\n```\n\n[example](examples/simple.go)\n\n## Install\n\n`go get -u github.com/lalabuy948/genvutils`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flalabuy948%2Fgenvutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flalabuy948%2Fgenvutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flalabuy948%2Fgenvutils/lists"}