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

Custom formatter #94

Open
Odonno opened this issue Oct 18, 2022 · 1 comment
Open

Custom formatter #94

Odonno opened this issue Oct 18, 2022 · 1 comment

Comments

@Odonno
Copy link

Odonno commented Oct 18, 2022

First of, thank you for this library. It really works like a charm.

I used this library to retrieve and store data for a .Xrc file. Kind of like you may have seen a .npmrc with npm.
My concern is that the output formatting I expect is a little different than the current output from this lib.

I would like to go from this:

[section]
key=value

To this:

[section]
    key = "value"

Notice the subtle differences:

  • The value has double-quotes around it
  • Each key-value pair inside a section is indented
  • The spaces between "=" and key/value
@zonyitoo
Copy link
Owner

zonyitoo commented Oct 19, 2022

The space around = is already added by #93 . So we may need an indentation configuration in WriteOption.

I am busy these days, feel free to open a PR if you will. :)

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

No branches or pull requests

2 participants