{"id":27228339,"url":"https://github.com/devzolo/go-ini","last_synced_at":"2025-07-22T15:09:47.636Z","repository":{"id":57646070,"uuid":"442076129","full_name":"devzolo/go-ini","owner":"devzolo","description":"A Go package tailored for manipulation, reading, and writing of INI files. This package is specifically designed to be compliant with Magic Software's \"Magic.ini\" format.","archived":false,"fork":false,"pushed_at":"2023-10-18T04:13:55.000Z","size":1435,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-20T07:05:56.961Z","etag":null,"topics":["golang","ini","lib","magic-software","magicini"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/devzolo/go-ini","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/devzolo.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,"governance":null}},"created_at":"2021-12-27T06:51:01.000Z","updated_at":"2023-10-18T04:28:25.000Z","dependencies_parsed_at":"2022-09-21T11:01:57.153Z","dependency_job_id":"c65e7cd2-df9e-4758-9fa5-572d4878bdf6","html_url":"https://github.com/devzolo/go-ini","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devzolo/go-ini","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devzolo%2Fgo-ini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devzolo%2Fgo-ini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devzolo%2Fgo-ini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devzolo%2Fgo-ini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devzolo","download_url":"https://codeload.github.com/devzolo/go-ini/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devzolo%2Fgo-ini/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266516481,"owners_count":23941436,"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-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["golang","ini","lib","magic-software","magicini"],"created_at":"2025-04-10T12:37:18.829Z","updated_at":"2025-07-22T15:09:47.616Z","avatar_url":"https://github.com/devzolo.png","language":"Go","readme":"# go-ini 🚀\n\n`go-ini` is a Go package tailored for manipulation, reading, and writing of INI files. This package is specifically designed to be compliant with [Magic Software's](https://www.magicsoftware.com/) \"Magic.ini\" format.\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"./docs/assets/magic.gif\" alt=\"Magic fun img\" width=\"300\"/\u003e\n\u003c/div\u003e\n\n[![](https://img.shields.io/github/actions/workflow/status/devzolo/go-ini/test.yml?branch=main\u0026longCache=true\u0026label=Test\u0026logo=github%20actions\u0026logoColor=fff)](https://github.com/devzolo/go-ini/actions?query=workflow%3ATest)\n[![Go Reference](https://pkg.go.dev/badge/github.com/devzolo/go-ini.svg)](https://pkg.go.dev/github.com/devzolo/go-ini)\n\n## 💡 Features\n\n- **Magic Software Compliance**: Adheres to the \"Magic.ini\" format specifications.\n- **Load and Parse**: Efficiently reads INI files.\n- **Write and Update**: Capable of writing updates to existing INI files or creating new ones.\n- **Section and Key Extraction**: Extract sections and keys from INI content with ease.\n- **Value Translation**: Translate values based on translatable sections.\n\n## 🛠 Usage\n\n### 🔧 Installation\n\nTo install the package, use:\n\n```bash\ngo get github.com/devzolo/go-ini\n```\n\n### Basic Usage\n\n```go\npackage main\n\nimport (\n  \"fmt\"\n\n  \"github.com/devzolo/go-ini\"\n)\n\nfunc main() {\n  cfg := ini.NewMagicIni()\n  err := cfg.LoadIni(\"path/to/your/magic.ini\")\n  if err != nil {\n    panic(err)\n  }\n  value := cfg.Get(\"SomeSection\", \"SomeKey\")\n  fmt.Println(value)\n}\n```\n\n## 📚 Documentation\n\n### 📄 `MagicIni` Structure\n\nRepresents a structured format of an INI file compliant with the \"Magic.ini\" standards. It houses the parsed data, the currently parsed section, and the section with translatable strings.\n\n### 🛠 Primary Methods\n\n- `NewMagicIni()`: Creates and returns a new `MagicIni` instance.\n- `LoadIni(path string)`: Reads and parses an INI file, particularly \"Magic.ini\", from the specified path.\n- `LoadAdditionalIni(path string)`: Loads an additional INI file from the specified path, merging its contents with the existing data.\n- `Get(section string, key string)`: Fetches a value for a specific section and key.\n- `Translate(str string)`: Translates placeholders in the provided string using the corresponding strings from the `TranslatableSection`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevzolo%2Fgo-ini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevzolo%2Fgo-ini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevzolo%2Fgo-ini/lists"}