{"id":15374763,"url":"https://github.com/mrtazz/kong-ini","last_synced_at":"2025-03-27T22:14:37.921Z","repository":{"id":55496682,"uuid":"324651326","full_name":"mrtazz/kong-ini","owner":"mrtazz","description":"ini file configuration resolver for alecthomas/kong","archived":false,"fork":false,"pushed_at":"2020-12-26T23:49:53.000Z","size":442,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-02T00:27:39.831Z","etag":null,"topics":["cli","command-line","golang","golang-library","kong"],"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/mrtazz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-26T23:19:22.000Z","updated_at":"2023-07-25T14:41:59.000Z","dependencies_parsed_at":"2022-08-15T01:50:17.825Z","dependency_job_id":null,"html_url":"https://github.com/mrtazz/kong-ini","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtazz%2Fkong-ini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtazz%2Fkong-ini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtazz%2Fkong-ini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtazz%2Fkong-ini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrtazz","download_url":"https://codeload.github.com/mrtazz/kong-ini/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245931894,"owners_count":20695964,"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":["cli","command-line","golang","golang-library","kong"],"created_at":"2024-10-01T13:59:43.103Z","updated_at":"2025-03-27T22:14:37.883Z","avatar_url":"https://github.com/mrtazz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kong-ini\n\n![CI](https://github.com/mrtazz/kong-ini/workflows/CI/badge.svg) [![](https://godoc.org/github.com/alecthomas/kong?status.svg)](http://godoc.org/github.com/alecthomas/kong)\n\nA [kong](https://github.com/alecthomas/kong) configuration resolver for `.ini`\nfiles.\n\n## Usage\n\n```go\nvar cli struct {\n    Config kong.ConfigFlag `help:\"Load configuration.\"`\n}\nparser, err := kong.New(\u0026cli, kong.Configuration(kongini.Loader, \"/etc/myapp/config.ini\", \"~/.myapp.ini))\n```\n\n### Config Format\nGiven the following app definition:\n\n```go\nvar cli struct {\n\tConfig     kong.ConfigFlag `help:\"Load configuration.\"`\n\tDebug      bool            `kong:\"name='debug'\"`\n\tString     string          `kong:\"name='string'\"`\n\tInt        int             `kong:\"name='int'\"`\n\tSlice      []string        `kong:\"name='slice'\"`\n\tIntslice   []int           `kong:\"name='intslice'\"`\n\tFloatslice []float64       `kong:\"name='floatslice'\"`\n\tMap        map[string]int  `kong:\"name='map'\"`\n\tCommand    struct {\n\t\tIsFoo bool   `kong:\"name='isFoo'\"`\n\t\tValue string `kong:\"name='value'\"`\n\t} `kong:\"cmd\"`\n\tDefault struct {\n\t} `kong:\"cmd\"`\n}\n```\n\nThis would be the corresponding `.ini` file:\n\n```ini\ndebug = true\nstring = \"a string\"\nint = 1\nslice = bla,foo bar,test\nintslice = 1,2,3\nfloatslice = 1.2,2.3,3.4\nmap = \"\"\"a=1;b=2;c=3\"\"\"\n\n[command]\nisFoo = false\nvalue = bar\n```\n\n## Installation\n\n```\ngo get github.com/mrtazz/kong-ini\n```\n\n## Inspiration\n- [kong yaml resolver](https://github.com/alecthomas/kong-yaml)\n- [globalconf](https://github.com/rakyll/globalconf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrtazz%2Fkong-ini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrtazz%2Fkong-ini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrtazz%2Fkong-ini/lists"}