{"id":17106303,"url":"https://github.com/aereal/go-envschema","last_synced_at":"2026-04-25T16:34:32.730Z","repository":{"id":57492555,"uuid":"166057613","full_name":"aereal/go-envschema","owner":"aereal","description":"Validate the runtime environment against given JSON schema.","archived":false,"fork":false,"pushed_at":"2019-01-18T09:57:21.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-23T14:44:22.185Z","etag":null,"topics":["go","golang","json-schema","twelve-factor"],"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/aereal.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":"2019-01-16T14:52:52.000Z","updated_at":"2020-05-29T17:50:39.000Z","dependencies_parsed_at":"2022-08-28T11:51:40.797Z","dependency_job_id":null,"html_url":"https://github.com/aereal/go-envschema","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aereal/go-envschema","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aereal%2Fgo-envschema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aereal%2Fgo-envschema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aereal%2Fgo-envschema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aereal%2Fgo-envschema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aereal","download_url":"https://codeload.github.com/aereal/go-envschema/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aereal%2Fgo-envschema/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32269462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"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":["go","golang","json-schema","twelve-factor"],"created_at":"2024-10-14T15:44:29.001Z","updated_at":"2026-04-25T16:34:32.714Z","avatar_url":"https://github.com/aereal.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/aereal/go-envschema.png?branch=master)][travis]\n[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)][license]\n[![GoDoc](https://godoc.org/github.com/aereal/go-envschema?status.svg)][godoc]\n\n# go-envschema\n\nValidate the runtime environment against given [JSON schema][json-schema].\n\n## Synopsis\n\n```go\nimport (\n\t\"github.com/aereal/go-envschema/loader\"\n\t\"github.com/xeipuuv/gojsonschema\"\n)\n\ntype config struct {\n\tAddr string `json:\"LISTEN_ADDR\"`\n}\n\nfunc run() error {\n\t// LISTEN_ADDR=localhost:8000\n\n\tloader, err := loader.New(gojsonschema.NewReferenceLoader(\"file://./config-schema.json\"))\n\tif err != nil {\n\t\treturn err\n\t}\n\tcfg := config{}\n\tif err := loader.Load(\u0026cfg); err != nil {\n\t\treturn err\n\t}\n\t// cfg.Addr // =\u003e \"localhost:8000\"\n\n\treturn nil\n}\n```\n\n## Motivation\n\n[The Twelve-Factor app][twelve-factor-app] that is container-aware application pattern mainly written by Heroku says \u003cq\u003ethe twelve-factor app stores config in environment variables\u003c/q\u003e.\n\nThat pattern is almost alive to this days but that is lacking in validation system in comparison with common config file pattern.\n\nSo all we need is validating the environment variables against the schema and mapping it into runtime structure mechanism.\n\nrefs. https://this.aereal.org/entry/container-apps-and-json-schema (Blog entry in Japanese)\n\n## Related works\n\n- [go-playground/validator][go-playground-validator]: focused on validating struct, no environment mapping\n\n[travis]: https://travis-ci.org/aereal/go-envschema\n[license]: https://github.com/aereal/go-envschema/blob/master/LICENSE\n[godoc]: https://godoc.org/github.com/aereal/go-envschema\n[twelve-factor-app]: https://12factor.net\n[json-schema]: https://json-schema.org\n[go-playground-validator]: https://github.com/go-playground/validator\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faereal%2Fgo-envschema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faereal%2Fgo-envschema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faereal%2Fgo-envschema/lists"}