{"id":19670264,"url":"https://github.com/jotaen/genie","last_synced_at":"2026-06-17T10:32:01.746Z","repository":{"id":65950155,"uuid":"601825301","full_name":"jotaen/genie","owner":"jotaen","description":"Your friendly .ini file parsing library, written in Go.","archived":false,"fork":false,"pushed_at":"2023-02-17T22:38:29.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-27T04:48:36.607Z","etag":null,"topics":["config","golang","ini","library","parser"],"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/jotaen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2023-02-14T22:42:50.000Z","updated_at":"2023-03-09T09:01:39.000Z","dependencies_parsed_at":"2023-05-16T09:30:56.229Z","dependency_job_id":null,"html_url":"https://github.com/jotaen/genie","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jotaen/genie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jotaen%2Fgenie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jotaen%2Fgenie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jotaen%2Fgenie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jotaen%2Fgenie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jotaen","download_url":"https://codeload.github.com/jotaen/genie/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jotaen%2Fgenie/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34445179,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"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":["config","golang","ini","library","parser"],"created_at":"2024-11-11T17:05:35.794Z","updated_at":"2026-06-17T10:32:01.739Z","avatar_url":"https://github.com/jotaen.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Genie 🧞‍♂️\n\nYour friendly .ini config file parser, written in Go.\n\n## Usage\n\n```go\npackage main\nimport (\"fmt\"; \"github.com/jotaen/genie\")\n\nconst iniText = `\n# Comment.\nkey = value\n\n[section1]\nfoo = bar\ntest = 123\n`\n\nfunc main() {\n\tdata, err := genie.Parse(iniText)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Access values directly, either from top-level or from section:\n\tfmt.Println(data.Get(\"key\")) // Prints `value`.\n\tfmt.Println(data.GetFromSection(\"section1\", \"foo\")) // Prints `bar`.\n\tfmt.Println(data.GetFromSection(\"section1\", \"test\")) // Prints `123`.\n\n\t// Retrieve all values from a section:\n\tsection1 := data.GetSection(\"section1\")\n\tfmt.Println(section1.Get(\"foo\")) // Prints `bar`.\n\tfmt.Println(section1.Get(\"test\")) // Prints `123`.\n\n\t// Accessing non-existing values returns empty string:\n\tfmt.Println(data.Get(\"asdfasdf\")) // Prints empty string.\n\tfmt.Println(data.GetFromSection(\"section26487\", \"bla\")) // Prints empty string.\n}\n```\n\n## Rules\n\n### Entries\n\n- An entry is a key/value pair.\n- The delimiter between key and value is the sequence of a `=` character surrounded by a space ` ` character on each side.\n- The key itself cannot contain whitespace.\n- All what follows behind the delimiter is value-land, including any whitespace, `#`’s, or really whatever.\n- The value might be absent, in which case the space behind the `=` may be absent too.\n- There is no difference between “absent” value or “empty” value.\n- Both the key and the value are case-sensitive.\n\n### Sections\n\n- A label wrapped in square brackets denotes the section for all following entries (until the next section).\n- All entries until the first explicit section belong to the top-level section.\n- Section names cannot be empty or blank; they are case-sensitive.\n\n### Comments\n\n- If a line starts with `#`, it’s treated as comment and is ignored.\n- There generally can’t be trailing comments.\n\n### Whitespace\n\n- Whitespace is a space ` ` or a tab `\\t`.\n- Lines can never start with whitespace, unless they are all blank.\n\n## License\n\n[MIT](LICENSE.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjotaen%2Fgenie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjotaen%2Fgenie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjotaen%2Fgenie/lists"}