basic: introduce basic one-shot INI-style decoder

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-09-01 14:21:55 +00:00
parent c92e0df47b
commit 174f72c4cf
5 changed files with 270 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
// Package basic provides a basic representation of dosini-style documents
package basic
// Document represents an INI-style document
type Document struct {
Global []Field
Sections []Section
}
// Section represents an INI-style section with optional GIT-style IDs
type Section struct {
Key string
ID string
EmptyID bool
Fields []Field
}
// Field represents a key = value entry in an INI-style document
type Field struct {
Key string
Value string
}