{"id":17875734,"url":"https://github.com/conero/inigo","last_synced_at":"2025-04-03T00:23:23.542Z","repository":{"id":57495592,"uuid":"144921103","full_name":"conero/inigo","owner":"conero","description":"golang parse for ini","archived":false,"fork":false,"pushed_at":"2020-07-24T02:48:12.000Z","size":12083,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-08T14:30:47.539Z","etag":null,"topics":["go-utils","golang","ini-parser"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/conero.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","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":"2018-08-16T01:31:47.000Z","updated_at":"2020-07-24T02:49:54.000Z","dependencies_parsed_at":"2022-08-30T17:20:10.772Z","dependency_job_id":null,"html_url":"https://github.com/conero/inigo","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conero%2Finigo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conero%2Finigo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conero%2Finigo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conero%2Finigo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conero","download_url":"https://codeload.github.com/conero/inigo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246912771,"owners_count":20853919,"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":["go-utils","golang","ini-parser"],"created_at":"2024-10-28T11:24:54.649Z","updated_at":"2025-04-03T00:23:23.520Z","avatar_url":"https://github.com/conero.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# inigo (go ini 文件解析库)\n\u003e - @author Joshua Conero\n\u003e - @descrip ini 文件解析器\n\n\n\n**\u003cspan style=\"color: blue\"\u003e项目以及迁移到：[github.com/conero/uymas/parser/xini](https://github.com/conero/uymas/tree/develop/parser/xini)，该库将不再更新和维护\u003c/span\u003e**\n\n\n\n## 项目管理\n- ``master`` 主分支；用户可下载使用\n- ``alpha`` 开发数据分支(develop)，程序开发不直接操作``master`` 而由开发该分组再合并到主分支\n- ``demo`` 项目实际测试；\n- ``document`` 项目文档\n- ``v{n}`` 历史版本分支，历史保存\n\n\n\n## 设计\n\n- `Parser`\t\t解析器**接口**\n  - `BaseParser`   默认*ini* 文件解析器\n  - `RongParser`   *rong* ini 文件解析器\n  - `TomlParser`  `toml 文件解析的支持`\n- `FileParser` 文件解析器**接口**\n- `StrParser` 字符串解析器**接口**\n\n\n\n\n\n### Base 解析器\n\n*支持基本的 ini 文件解析，和简单的扩展语法*\n\n\n\n\u003e 支持类型\n\n------\n\n*与 go 语言特性紧密结合*\n\n```go\nbool\nb1 = true\t\t\t\t// 不区分大小写\nb2 = false\n\nint64\ni = 56\n\nfloat64\nf64 = 78.455\n\nstring\ns1 = 字符串，无效引号\ns2 = '可使用单引号'\ns3 = \"依赖可用双引号\"\n\narray/slice\n// 单行数组\ninta = 1, 5, 4, 6, 7, 9\nfloata = 7.54, 6.24, 74.24\nstra = tttt, kdjd, ddd\nstra2 = \"ffff,fff\", 'hhhh', ttt\nstra2 = \"ffff,fff\", 'hhhh', \"ttt\"\n\n\nmap\n// 简单二级\".\"操作，不能大于三年级如: map.c1.c2\n// 该写法与 PHP.ini 配置文件相识，亦可考虑设置开关键\n// map[interface{}]interface{}\nm.name = map 数据类型处理\nm.78 = 5555\n```\n\n\n\n\n\n\u003e 指定定义变量/引用值\n\n```ini\n; 定义变量\n$var = 85\nauthor = Joshua Conero\n\n\nstr = \"the var is : $var\"     \t; the var is : 85\nstr2 = 'the var is : $var'     \t; the var is : $var\nstr3 = \"the var is : \u0026author\"   ; the var is : Joshua Conero\n```\n\n\n\n\n\n\n\n\n\n## 分支\n\n- v0.x 版本\n  - [详情](./doc/readme-v0.x.md)\n  - 开发周期： @20170119 - 20170424\n    v1.x 版本\t\t(开发中)\n  - 开始： 20171028 -\u003e \n    v2.x (版本)\t\n    - 通过对 go 语言的学习重新库；v1.x中项目设计多数受其他语言的影响，完全按照go语言的风格。\n\n\n\n## 使用\n\n### 安装\n\n```ini\n# github\n$ go get -u  github.com/conero/inigo\n\n```\n\n### 获取解析器\n\n```go\n// 获取默认解析器(BaseParser)\nini := inigo.NewParser()\n\nrong := inigo.NewParser(\"rong\")\n//或者\nrong2 := inigo.NewParser(map[string]interface{}{\n    \"driver\": \"rong\"\n})\n\n```\n\n\n\n\n\n## v2.x (20180819 - )\n\n`v2.0 第二版本的初始版本，项目开发中。到 v2.1 将趋于稳定`\n\n### 特性\n\n- 使用新的 *git* 管理方式；见 ``项目管理``\n- 程序测试使用go语言提供的 *test* 测试程序\n- 删除项目中与库无关的文件夹，转移至分支\n\n\n\n\u003e ***go 开发环境：***\n\n- go@1.10\n- gogland\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconero%2Finigo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconero%2Finigo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconero%2Finigo/lists"}