aboutsummaryrefslogtreecommitdiff
path: root/lib/ini/struct_field.go
AgeCommit message (Collapse)Author
11 daysall: apply go fixShulhan
2026-01-15all: convert license and copyright to use SPDX identifiersShulhan
With help of spdxconv tool [1], we able to bulk update all files license and copyright format to comply with SPDX formats. [1] https://kilabit.info/project/spdxconv/
2023-09-14all: fix variable shadowing as reported by shadow toolShulhan
The shadow tool [1] report a variable where its name is declared twice or more, in different scope. [1] https://pkg.go.dev/golang.org/x/tools@v0.13.0/go/analysis/passes/shadow
2022-02-06lib/ini: realign all structsShulhan
Changes, * reader: from 184 to 168 bytes (-16 bytes) * Section: from 104 to 88 bytes (-16 bytes) * structField: from 120 to 112 bytes (-8 bytes) * variable: from 120 to 104 bytes (-16 bytes)
2021-02-28ini: refactoring unmarshal functionShulhan
Previously, we use the passed struct as reference for unmarshalling the ini text into struct. This model on unmarshaling does not works well if we want to unmarshal to slice of struct. This commit changes the way the unmarshal works by iterating over section and variables from parsed ini text file and do a lookup on the passed struct to find field that match the section, subsection and key. With this model we can unmarshal a section-subsction into struct or slice of struct.