{"id":17882127,"url":"https://github.com/nao1215/denv","last_synced_at":"2026-02-14T23:04:14.058Z","repository":{"id":195723109,"uuid":"693436577","full_name":"nao1215/denv","owner":"nao1215","description":"\"denv\" is a library that manages the deployment environment, which can be one of development, integration, staging, or production.","archived":false,"fork":false,"pushed_at":"2024-08-02T13:36:25.000Z","size":51,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-04T22:26:03.450Z","etag":null,"topics":["deployment-environment","golang","runtime"],"latest_commit_sha":null,"homepage":"","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/nao1215.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"nao1215","patreon":"emigre680"}},"created_at":"2023-09-19T03:07:40.000Z","updated_at":"2024-08-02T12:25:41.000Z","dependencies_parsed_at":"2023-10-11T11:56:59.044Z","dependency_job_id":"a136debb-fb2a-4a34-b2de-089ac3381d7e","html_url":"https://github.com/nao1215/denv","commit_stats":null,"previous_names":["nao1215/denv"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nao1215/denv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nao1215%2Fdenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nao1215%2Fdenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nao1215%2Fdenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nao1215%2Fdenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nao1215","download_url":"https://codeload.github.com/nao1215/denv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nao1215%2Fdenv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29460136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T22:42:09.113Z","status":"ssl_error","status_checked_at":"2026-02-14T22:42:05.053Z","response_time":53,"last_error":"SSL_read: 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":["deployment-environment","golang","runtime"],"created_at":"2024-10-28T12:48:11.409Z","updated_at":"2026-02-14T23:04:14.022Z","avatar_url":"https://github.com/nao1215.png","language":"Go","funding_links":["https://github.com/sponsors/nao1215","https://patreon.com/emigre680"],"categories":[],"sub_categories":[],"readme":"![Coverage](https://raw.githubusercontent.com/nao1215/octocovs-central-repo/main/badges/nao1215/denv/coverage.svg)\n[![LinuxUnitTest](https://github.com/nao1215/denv/actions/workflows/linux_test.yml/badge.svg)](https://github.com/nao1215/denv/actions/workflows/linux_test.yml)\n[![MacUnitTest](https://github.com/nao1215/denv/actions/workflows/mac_test.yml/badge.svg)](https://github.com/nao1215/denv/actions/workflows/mac_test.yml)\n[![WindowsUnitTest](https://github.com/nao1215/denv/actions/workflows/windows_test.yml/badge.svg)](https://github.com/nao1215/denv/actions/workflows/windows_test.yml)\n[![FreeBSDTest](https://github.com/nao1215/denv/actions/workflows/freebsd.yml/badge.svg)](https://github.com/nao1215/denv/actions/workflows/freebsd.yml)\n[![NetBSDTest](https://github.com/nao1215/denv/actions/workflows/netbsd.yml/badge.svg)](https://github.com/nao1215/denv/actions/workflows/netbsd.yml)\n[![OpenBSDTest](https://github.com/nao1215/denv/actions/workflows/openbsd.yml/badge.svg)](https://github.com/nao1215/denv/actions/workflows/openbsd.yml)\n[![DragonflyBSDTest](https://github.com/nao1215/denv/actions/workflows/dragonfly.yml/badge.svg)](https://github.com/nao1215/denv/actions/workflows/dragonfly.yml)\n[![Gosec](https://github.com/nao1215/denv/actions/workflows/security.yml/badge.svg)](https://github.com/nao1215/denv/actions/workflows/security.yml)\n[![Vuluncheck](https://github.com/nao1215/denv/actions/workflows/govulncheck.yml/badge.svg)](https://github.com/nao1215/denv/actions/workflows/govulncheck.yml)\n[![reviewdog](https://github.com/nao1215/denv/actions/workflows/reviewdog.yml/badge.svg)](https://github.com/nao1215/denv/actions/workflows/reviewdog.yml)\n[![Go Reference](https://pkg.go.dev/badge/github.com/nao1215/denv.svg)](https://pkg.go.dev/github.com/nao1215/denv)\n[![Go Report Card](https://goreportcard.com/badge/github.com/nao1215/denv)](https://goreportcard.com/report/github.com/nao1215/denv)\n# denv\n\"denv\" is a library that manages the deployment environment, which can be one of development, integration, staging, or production.\n\n## How to use\n1. You import the library: \"github.com/nao1215/denv\"\n2. You set the environment variable \"APP_ENV\" to one of \"development\", \"integration\", \"staging\", or \"production\".\n3. You create a new Env instance with denv.NewEnv().\n   \n```go\nfunc Example() {\n\tif err := os.Setenv(\"APP_ENV\", denv.Staging); err != nil {\n\t\tfmt.Println(\"Error setting environment variable:\", err)\n\t\treturn\n\t}\n\n\t// Create a new Env instance.\n\tenv, err := denv.NewEnv()\n\tif err != nil {\n\t\tfmt.Println(\"Error creating environment:\", err)\n\t\treturn\n\t}\n\n\t// Print the current environment.\n\tfmt.Printf(\"Current environment: %s\\n\", env.String())\n\n\t// Check if it's the development environment.\n\tif env.IsDevelopment() {\n\t\tfmt.Println(\"This is the development environment.\")\n\t} else {\n\t\tfmt.Println(\"This is not the development environment.\")\n\t}\n\n\t// Check if it's the production environment.\n\tif env.IsProduction() {\n\t\tfmt.Println(\"This is the production environment.\")\n\t} else {\n\t\tfmt.Println(\"This is not the production environment.\")\n\t}\n\n\t// Output:\n\t// Current environment: staging\n\t// This is not the development environment.\n\t// This is not the production environment.\n}\n```\n\n## Support OS \u0026 go version\n- Linux\n- Mac\n- Windows\n- FreeBSD\n- OpenBSD\n- NetBSD\n- DragonflyBSD\n- go version 1.20 or later\n\n## LICENSE\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnao1215%2Fdenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnao1215%2Fdenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnao1215%2Fdenv/lists"}