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

[WIP] Add write methods #286

Closed
wants to merge 9 commits into from
Closed

Conversation

theherk
Copy link
Contributor

@theherk theherk commented Dec 9, 2016

This PR is a work in progress. It is based on earlier code submitted by @g3rk6 in #153. I am working through satisfying the requests in @spf13's comments.

It adds methods to write the configuration back to the file or to a new file. There are methods to do so only if the file does not exist.

The two things stopping this from being done are:

  • I cannot determine how to encode the map to hcl. I'm sure there is a way, but I have not worked it out yet. I think it will have to be printed to a writer. It would be nice if there was a map to string method. If anybody has a good idea, let me know.
  • I have not written any tests yet. That may take a few.

After this is done, I also intend to add methods to write specific values in the map to file. In that case, you don't have to worry about adding unwanted values like env variables to the file.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ g3rk6
❌ theherk

@theherk
Copy link
Contributor Author

theherk commented Dec 9, 2016

Pull requests opened with wrong committer. Will reopen.

@theherk theherk closed this Dec 9, 2016
@theherk theherk deleted the feature/write-config branch December 9, 2016 01:19
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 this pull request may close these issues.

3 participants