Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Go GLOME config file parsing #168

Closed
lukegb opened this issue Aug 10, 2023 · 0 comments · Fixed by #169
Closed

Add Go GLOME config file parsing #168

lukegb opened this issue Aug 10, 2023 · 0 comments · Fixed by #169

Comments

@lukegb
Copy link
Collaborator

lukegb commented Aug 10, 2023

We have an internal user of GLOME that's written their own config parser. Let's provide an in-tree config parser in Go, so we can include it in test suites publically and keep it updated in lockstep with the C one.

lukegb added a commit to lukegb/glome that referenced this issue Aug 10, 2023
lukegb added a commit to lukegb/glome that referenced this issue Aug 10, 2023
lukegb added a commit to lukegb/glome that referenced this issue Aug 10, 2023
lukegb added a commit to lukegb/glome that referenced this issue Aug 24, 2023
lukegb added a commit to lukegb/glome that referenced this issue Oct 5, 2023
This implements INI parsing internally, rather than pulling in a library because
we want to exactly match the behaviour of the C library, and our INI-parsing has
a few quirks (as do all INI parsers...) - for instance, we only support comments
if they're on their own line.

Additionally, the code that does the INI parsing is relatively small; the bulk of
the code is actually parsing things into application specific structs, which we
would need to do anyway. Possibly this is ripe for switching to TOML, but we'd still
have to e.g. parse string encoded keys to binary/validate that the options set
are compatible with each other.

Fixes google#168.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant