{"id":17287656,"url":"https://github.com/mdouchement/koanflua","last_synced_at":"2025-10-26T10:06:30.895Z","repository":{"id":57520532,"uuid":"250669138","full_name":"mdouchement/koanflua","owner":"mdouchement","description":"Koanf Lua allows to write dynamic configuration files for koanf configuration manager.","archived":false,"fork":false,"pushed_at":"2023-03-17T16:06:21.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-15T15:09:51.543Z","etag":null,"topics":["configuration","configuration-management","configuration-parser","koanf","lua"],"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/mdouchement.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":"2020-03-27T23:09:25.000Z","updated_at":"2024-03-30T03:49:55.000Z","dependencies_parsed_at":"2022-09-26T18:01:00.893Z","dependency_job_id":null,"html_url":"https://github.com/mdouchement/koanflua","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mdouchement/koanflua","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdouchement%2Fkoanflua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdouchement%2Fkoanflua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdouchement%2Fkoanflua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdouchement%2Fkoanflua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdouchement","download_url":"https://codeload.github.com/mdouchement/koanflua/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdouchement%2Fkoanflua/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281086686,"owners_count":26441443,"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","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["configuration","configuration-management","configuration-parser","koanf","lua"],"created_at":"2024-10-15T10:05:54.778Z","updated_at":"2025-10-26T10:06:30.832Z","avatar_url":"https://github.com/mdouchement.png","language":"Go","readme":"# Koanf Lua\n\nKoanf Lua allows to write dynamic configuration files for [koanf](https://github.com/knadh/koanf) configuration manager. Sometimes dynamic configuration is required.\n\n## Usage\n\n\n```lua\n-- config.lua\nlocal os = require \"os\"\n\nlocal config = {\n  brokers = array({\"localhost:42\", \"localhost:4242\"}), -- Hack for Golang to detect the table as an array\n  listen = \"localhost\",\n  redis = {\n    addr = \"localhost:6379\",\n    password = \"trololo\",\n    db = 1\n  }\n}\n\nif os.getenv(\"MAGIC_FEATURE\") == \"enabled\" then\n  config[\"feature\"] = \"testouille\"\nend\n\nluaconfig(config)\n```\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/knadh/koanf\"\n\t\"github.com/knadh/koanf/providers/file\"\n\t\"github.com/mdouchement/koanflua\"\n)\n\nfunc main() {\n\tkonf := koanf.New(\".\")\n\terr := konf.Load(file.Provider(\"config.lua\"), koanflua.Parser())\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t//\n\n\tredisAddr := konf.String(\"redis.addr\")\n\tfmt.Println(redisAddr)\n}\n```\n\n## Resources\n\n- Default Lua library (same as Lua's VM): https://github.com/Shopify/go-lua\n- Extra Lua library: https://github.com/Shopify/goluago\n\n## License\n\n**MIT**\n\n\n## Contributing\n\nAll PRs are welcome.\n\n1. Fork it\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n5. Push to the branch (git push origin my-new-feature)\n6. Create new Pull Request\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdouchement%2Fkoanflua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdouchement%2Fkoanflua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdouchement%2Fkoanflua/lists"}