{"id":16848684,"url":"https://github.com/d5/go-env","last_synced_at":"2025-03-18T07:24:26.695Z","repository":{"id":57494092,"uuid":"160469808","full_name":"d5/go-env","owner":"d5","description":null,"archived":false,"fork":false,"pushed_at":"2019-04-07T00:20:17.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-24T14:14:00.203Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d5.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}},"created_at":"2018-12-05T06:10:39.000Z","updated_at":"2023-09-07T15:20:33.000Z","dependencies_parsed_at":"2022-09-06T07:23:02.619Z","dependency_job_id":null,"html_url":"https://github.com/d5/go-env","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d5%2Fgo-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d5%2Fgo-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d5%2Fgo-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d5%2Fgo-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d5","download_url":"https://codeload.github.com/d5/go-env/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244174622,"owners_count":20410545,"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-10-13T13:12:12.504Z","updated_at":"2025-03-18T07:24:26.677Z","avatar_url":"https://github.com/d5.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-env\n\n[![GoDoc](https://godoc.org/github.com/d5/go-env?status.svg)](https://godoc.org/github.com/d5/go-env)\n\nSimple Go library to load environment variables from files.\n\n```golang\npackage main\n\nimport github.com/d5/go-env\n\nfunc main() {\n  // read \".env\" file and set environment variables\n  env.Load(\".env\")\n\n  // ...\n}\n```\n\n## Environment File Syntax \n\nBasic format per line is `key=value`.\n\n```\nKEY1=VALUE1\nKEY2=VALUE2\n```\n\nYou can include the comment using `#` character:\n\n```\n# line commenets\nFOO=bar          # trailing whitespaces are ignored: key \"FOO\" value \"bar\"\n```\n\nPreceding and trailing whitespaces are ignored and not included when setting the environment variables:\n\n```\n  FOO=bar        # key \"FOO\" value \"bar\"   \n```\n\nBut, the whitespaces between key and value are illegal.\n\n```\nFOO = bar        # illegal\n```\n\nUse double/single quotes to set multi-words values.\n\n```\nFOO=\"bar bar\"    # key \"FOO\" value \"bar bar\"\nFOO=bar bar      # if not quoted, only the first words will be taken\n                 # key \"FOO\" value \"bar\"\nFOO='bar # bar'  # key \"FOO\" value \"bar # bar\"   \nFOO= bar         # empty value: key \"FOO\" value \"\"              \n```\n\nFor the compatibility with Bash, preceding 'export' is ignored.\n\n```\nexport FOO=bar  # key \"FOO\" value \"bar\n```\n\nAdditional notes:\n\n- Variable names can contain alphabetical letters, numbers, underlines (`_`), and, dash (`-`).\n- Comment lines or invalid/illegal lines are ignored by `env.Load()` function. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd5%2Fgo-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd5%2Fgo-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd5%2Fgo-env/lists"}