{"id":26685447,"url":"https://github.com/goapt/dotenv","last_synced_at":"2025-03-26T10:16:05.930Z","repository":{"id":57518465,"uuid":"248122858","full_name":"goapt/dotenv","owner":"goapt","description":"golang get Env in dotfile","archived":false,"fork":false,"pushed_at":"2020-03-18T04:03:53.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-07-27T14:42:17.125Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goapt.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}},"created_at":"2020-03-18T02:46:01.000Z","updated_at":"2021-01-20T14:21:43.000Z","dependencies_parsed_at":"2022-09-26T18:01:42.131Z","dependency_job_id":null,"html_url":"https://github.com/goapt/dotenv","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goapt%2Fdotenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goapt%2Fdotenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goapt%2Fdotenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goapt%2Fdotenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goapt","download_url":"https://codeload.github.com/goapt/dotenv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245632400,"owners_count":20647194,"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":"2025-03-26T10:16:04.749Z","updated_at":"2025-03-26T10:16:05.925Z","avatar_url":"https://github.com/goapt.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# golang dotenv\n\u003ca href=\"https://github.com/goapt/dotenv/actions\"\u003e\u003cimg src=\"https://github.com/goapt/dotenv/workflows/build/badge.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\n\n## Usage\n\nAdd your application configuration to your .env file in the root of your project:\n```shell script\nS3_BUCKET=YOURS3BUCKET\nSECRET_KEY=YOURSECRETKEYGOESHERE\n```\nThen in your Go app you can do something like\n\n```go\npackage main\n\nimport (\n    \"log\"\n    \"os\"\n\n    \"github.com/goapt/dotenv\"\n)\n\nfunc main() {\n  err := dotenv.Load()\n  if err != nil {\n    log.Fatal(\"Error loading .env file\")\n  }\n\n  s3Bucket := os.Getenv(\"S3_BUCKET\")\n  secretKey := os.Getenv(\"SECRET_KEY\")\n\n  // now do something with s3 or whatever\n}\n```\n\n## Thanks\n\nhttps://github.com/joho/godotenv\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoapt%2Fdotenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoapt%2Fdotenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoapt%2Fdotenv/lists"}