{"action":"created","issue":{"url":"https://api.github.com/repos/spf13/viper/issues/287","repository_url":"https://api.github.com/repos/spf13/viper","labels_url":"https://api.github.com/repos/spf13/viper/issues/287/labels{/name}","comments_url":"https://api.github.com/repos/spf13/viper/issues/287/comments","events_url":"https://api.github.com/repos/spf13/viper/issues/287/events","html_url":"https://github.com/spf13/viper/pull/287","id":194490828,"number":287,"title":"Feature/write config","user":{"login":"theherk","id":3605078,"avatar_url":"https://avatars.githubusercontent.com/u/3605078?v=3","gravatar_id":"","url":"https://api.github.com/users/theherk","html_url":"https://github.com/theherk","followers_url":"https://api.github.com/users/theherk/followers","following_url":"https://api.github.com/users/theherk/following{/other_user}","gists_url":"https://api.github.com/users/theherk/gists{/gist_id}","starred_url":"https://api.github.com/users/theherk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theherk/subscriptions","organizations_url":"https://api.github.com/users/theherk/orgs","repos_url":"https://api.github.com/users/theherk/repos","events_url":"https://api.github.com/users/theherk/events{/privacy}","received_events_url":"https://api.github.com/users/theherk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-12-09T01:28:25Z","updated_at":"2016-12-19T21:44:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/spf13/viper/pulls/287","html_url":"https://github.com/spf13/viper/pull/287","diff_url":"https://github.com/spf13/viper/pull/287.diff","patch_url":"https://github.com/spf13/viper/pull/287.patch"},"body":"This PR is a work in progress. It is based on earlier code submitted by @g3rk6 in spf13/viper#153. I am working through satisfying the requests in @spf13's comments.\r\n\r\nIt 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.\r\n\r\nThe two things stopping this from being done are:\r\n- 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.\r\n- I have not written any tests yet. That may take a few.\r\n\r\nAfter 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."},"comment":{"url":"https://api.github.com/repos/spf13/viper/issues/comments/268087559","html_url":"https://github.com/spf13/viper/pull/287#issuecomment-268087559","issue_url":"https://api.github.com/repos/spf13/viper/issues/287","id":268087559,"user":{"login":"theherk","id":3605078,"avatar_url":"https://avatars.githubusercontent.com/u/3605078?v=3","gravatar_id":"","url":"https://api.github.com/users/theherk","html_url":"https://github.com/theherk","followers_url":"https://api.github.com/users/theherk/followers","following_url":"https://api.github.com/users/theherk/following{/other_user}","gists_url":"https://api.github.com/users/theherk/gists{/gist_id}","starred_url":"https://api.github.com/users/theherk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theherk/subscriptions","organizations_url":"https://api.github.com/users/theherk/orgs","repos_url":"https://api.github.com/users/theherk/repos","events_url":"https://api.github.com/users/theherk/events{/privacy}","received_events_url":"https://api.github.com/users/theherk/received_events","type":"User","site_admin":false},"created_at":"2016-12-19T21:44:35Z","updated_at":"2016-12-19T21:44:35Z","body":"Also fixes #33 and fixes #113."}}
{"actor":{"display_login":"theherk"}}