Commit Graph
333 Commits
Author SHA1 Message Date
Kashish SahuandGitHub 360a98b83c Optimize Key.Strings by reducing memory re-allocations and simplifying control flow (#385) v1.67.3 2026-06-08 08:12:57 -04:00
89efed6562 key: apply ValueMapper to substituted reference values (#382)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
v1.67.2
2026-05-02 21:44:05 -04:00
5a14e1849d Fix parsing of double-quoted values with backslash continuations (#373)
Co-authored-by: ᴊᴏᴇ ᴄʜᴇɴ <jc@unknwon.io>
v1.67.1
2026-01-10 13:46:57 -05:00
ᴊᴏᴇ ᴄʜᴇɴandGitHub 54a0ff78ec chore: enable Go modules and modernize CI (#374) 2026-01-10 13:39:55 -05:00
Jade ClarkeandGitHub b2f570e5b5 ini: allow changing the default section name (#319) v1.67.0 2022-08-08 19:35:30 +08:00
Carlos Henrique Guardão GandarezandGitHub 6098d4257e parser: fix line skipping when key is empty (#323) v1.66.6 2022-05-31 07:13:15 +08:00
Joe ChenandGitHub 7c569cc85f chore: various config updates to CI (#322) 2022-05-29 17:04:41 +08:00
842b9a946d write: pretty print section only if it is not the last one (#321)
Co-authored-by: Joe Chen <jc@unknwon.io>
v1.66.5
2022-05-29 16:48:25 +08:00
386cf30655 lsif: update upload endpoint (#317)
Co-authored-by: Sourcegraph <batch-changes@sourcegraph.com>
2022-03-10 23:29:47 +08:00
Joe ChenandGitHub 6d3eeb0dc8 README: use branch check status instead of workflow 2022-02-25 15:21:06 +08:00
Joe ChenandGitHub 39f9e49bca key: ignore empty values in ValueWithShadows (#316) v1.66.4 2022-02-10 18:18:52 +08:00
fcd6cc399e Return an empty array from ValueWithShadows if there is none (#313)
Co-authored-by: Joe Chen <jc@unknwon.io>
v1.66.3
2022-01-20 16:38:35 +08:00
Joe ChenandGitHub d26f092124 github: refurbish issue forms and pull request templates (#312) 2021-12-23 16:14:21 +08:00
Riley AvronandGitHub c71eccd557 Fix nested values can span sections (#306) v1.66.2 2021-12-02 22:07:20 +08:00
Carlos Henrique Guardão GandarezandGitHub 3ca1e6ad32 Fix python multiline EOF error (#309) v1.66.1 2021-12-02 16:56:40 +08:00
b5054165a6 file: add HasSection method (#308)
Co-authored-by: Joe Chen <jc@unknwon.io>
v1.66.0
2021-11-30 10:47:46 +08:00
Carlos Henrique Guardão GandarezandGitHub e641746ab9 Fix parsing python multiline string (#299) v1.65.0 2021-11-28 13:00:47 +08:00
Joe Chen c2f10d6ccf file: fix legacy tests v1.64.0 2021-11-12 21:50:40 +08:00
tphilippeau-towerandGitHub 1c1c7acc1c Fix creation of default section (#301) 2021-11-12 21:40:34 +08:00
Joe ChenandGitHub 6a280a6a5a README: update minimum requirement Go version to be 1.12 2021-11-11 23:20:28 +08:00
Joe ChenandGitHub 14e9811b16 test: rename package to be same as the main (#304) v1.63.2 2021-09-16 13:34:39 +08:00
Joe ChenandGitHub fd697c7bd6 ci: workaround to make lint work (#303) v1.63.1 2021-09-16 00:13:38 +08:00
Márk Sági-KazárandGitHub bba62c3754 all: rewrite tests to use testify instead of goconvey (#300) 2021-09-16 00:03:44 +08:00
Drayton MunsterandGitHub 326d24fbbe key: add AllowDuplicateShadowValues option (#298) v1.63.0 2021-09-07 11:41:39 +08:00
ᴜɴᴋɴᴡᴏɴandGitHub b52868c71b section: preallocate the size of keys hash (#297) v1.62.1 2021-09-04 14:18:47 +08:00
ᴜɴᴋɴᴡᴏɴandGitHub f8a14abc12 ci: update GitHub Actions (#296) 2021-09-04 14:03:50 +08:00
5e97220809 Add extends functionality to allow embedded fields (#269)
* Add extends functionality to allow embedded fields

Signed-off-by: Andrew Thornton <art27@cantab.net>

* allow extends with name

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update struct.go

Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>

* Update struct_test.go

Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
v1.62.0
2020-10-06 15:31:30 +08:00
yuangongjiandGitHub 2a76f61e24 test: add test cases to increase test coverage (#268) 2020-09-21 12:42:15 +08:00
61b722356d Fix typo in a comment (#266)
Co-authored-by: alex-theqoos <alex@theqoos.com>
2020-09-18 16:12:40 +08:00
fcd0515f91 Support Short-circuit load (#261)
Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
v1.61.0
2020-09-05 16:15:51 +08:00
ᴜɴᴋɴᴡᴏɴandGitHub 01f073e4a0 ci: add Go 1.15.x 2020-09-04 11:45:24 +08:00
abeaefd44b struct: Support reflect from struct with non-anonymous structure pointer (#259)
Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>

Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
v1.60.2
2020-08-27 17:33:25 +08:00
yuangongjiandGitHub 31bf7ce993 file: fix whitespaces are filtered in the SaveTo method (#260) v1.60.1 2020-08-23 13:36:48 +08:00
Kevin SchmittleandGitHub 29f972a20e Allow alternative delimiter for child sections (#255)
ini: added option for ChildSectionDelimiter
file: added default for ChildSectionDelimiter (".") to maintain current behavior by default
section:
  - append ChildSectionDelimiter instead of "." when checking if each section name begins with prefix
  - use ChildSectionDelimiter instead of "." when checking for LastIndex of delimiter
v1.60.0
2020-08-16 19:21:38 +08:00
8e98c6523e fix reflect from struct with multiple shadow keys (#254)
Co-authored-by: jmluang <350216438@qq.com>
Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
2020-08-16 19:20:02 +08:00
f1d9ab1fbe Add options to control sections insensitive or keys insensitive respectively (#253)
Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
v1.59.0
2020-08-16 19:06:32 +08:00
yuangongjiandGitHub 1a3a8f7640 file: fix deleting the default section makes the next section inaccessible (#256) v1.58.0 2020-08-13 23:04:42 +08:00
aligatorandGitHub 1fc6efb6f2 struct: correctly mapping non unique sections to slice field (#242)
* bugfix: use the value from the correct section when using non unique sections in some special cases

* refactor wording and small fix
v1.57.0
2020-05-28 13:00:39 +08:00
ᴜɴᴋɴᴡᴏɴandGitHub ad8a10643d struct: ignore unexported fields when reflect (#239) v1.56.0 2020-05-09 22:43:35 +08:00
ᴜɴᴋɴᴡᴏɴandGitHub 0b997d758f Update README.md 2020-04-18 16:08:56 +08:00
bdfaee2a78 refactor: optimize repetitive parsing code (#233)
Co-authored-by: 林通 <lintong@datacloak.com.cn>
2020-03-31 18:03:22 +08:00
8a3836d82d codecov: formalize coverage settings (#232)
Co-authored-by: Sourcegraph Bot <campaigns@sourcegraph.com>
2020-03-29 15:34:55 +08:00
cd59c6e8b9 codecov: set comment style (#231)
Co-authored-by: Sourcegraph Bot <campaigns@sourcegraph.com>
2020-03-28 16:22:06 +08:00
91a7cdb4a0 ci: migrate from Travis to GitHub Actions (#230)
* ci: migrate from Travis to GitHub Actions

* Setting up GOPATH

* Download dependencies

* Fix GOPATH

* Fix GOPATH

* Fix GOPATH

* Fix deps

* Damn it!

* ???

* Init Go mod

* Fix lint errors

* Fix failing tests on Windows

* Skip some tests on Windows

Co-authored-by: Sourcegraph Bot <campaigns@sourcegraph.com>
2020-03-28 14:26:37 +08:00
ᴜɴᴋɴᴡᴏɴandGitHub 09e0d86be8 Enable Codecov (#228) 2020-03-21 10:56:07 +08:00
ᴜɴᴋɴᴡᴏɴ 39bc4ddcb8 .travis: fix warnings v1.55.0 2020-03-15 20:54:19 +08:00
ᴜɴᴋɴᴡᴏɴ f54734858c ci: enable Go 1.14 2020-03-15 20:53:08 +08:00
ᴜɴᴋɴᴡᴏɴ efe974c381 *: clean up code and error message 2020-03-15 20:51:39 +08:00
aligatorandGitHub faf04e23c2 file: support non-unique sections (#220)
* Support for non unique sections. Enabled with the option AllowNonUniqueSections.

* Non unique section support for MapToStruct

* Non unique section support for section.MapTo

* implement ini.ReflectFrom() for non unique sections

* implement xyz.Section("xyz").ReflectFrom() for non unique sections

* Refactor suggested changes after review

* remove GetSectionCount

* do not initialize sectionList if NonUniqueSections are disabled

* add test for deleting all sections of the same name

* refactor mapAllTo

* refactor ReflectFrom

* fix some comments

* refactoring based on PR suggestions

* update DeleteSectionWithIndex error
2020-03-15 19:21:17 +08:00
8e0f5b3a15 file: customize output delimiter (#226)
* customization output delimiter

* rename KeyValueDelimitersOutput to KeyValueDelimiterOnWrite

* add test for writing with KeyValueDelimiterOnWrite

* bugfix: use '=' as the default delimiter on write

Co-authored-by: Chaliy Roman <cerebrum.ch@gmail.com>
v1.54.0
2020-03-07 22:35:44 +08:00