{"action":"created","issue":{"url":"https://api.github.com/repos/coreos/etcd/issues/4144","labels_url":"https://api.github.com/repos/coreos/etcd/issues/4144/labels{/name}","comments_url":"https://api.github.com/repos/coreos/etcd/issues/4144/comments","events_url":"https://api.github.com/repos/coreos/etcd/issues/4144/events","html_url":"https://github.com/coreos/etcd/pull/4144","id":125161939,"number":4144,"title":"client: file and environment variables based configuration","user":{"login":"mitake","id":1173955,"avatar_url":"https://avatars.githubusercontent.com/u/1173955?v=3","gravatar_id":"","url":"https://api.github.com/users/mitake","html_url":"https://github.com/mitake","followers_url":"https://api.github.com/users/mitake/followers","following_url":"https://api.github.com/users/mitake/following{/other_user}","gists_url":"https://api.github.com/users/mitake/gists{/gist_id}","starred_url":"https://api.github.com/users/mitake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitake/subscriptions","organizations_url":"https://api.github.com/users/mitake/orgs","repos_url":"https://api.github.com/users/mitake/repos","events_url":"https://api.github.com/users/mitake/events{/privacy}","received_events_url":"https://api.github.com/users/mitake/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":35,"created_at":"2016-01-06T11:43:16Z","updated_at":"2016-01-15T06:59:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/coreos/etcd/pulls/4144","html_url":"https://github.com/coreos/etcd/pull/4144","diff_url":"https://github.com/coreos/etcd/pull/4144.diff","patch_url":"https://github.com/coreos/etcd/pull/4144.patch"},"body":"Current etcd client library doesn't provide a mechanism for creating\r\nclient.Client object based on file or env vars. Therefore users must\r\nwrite their own feature for the purpose in their applications.\r\n\r\nFor avoiding the duplicated implementations, this PR adds new\r\nfunctions for creating client with file and environment variables\r\nbased on viper.\r\n\r\nNewWithFile(client.Config, configPath string): create a new Client\r\nwith a file. Any file formats supported by viper will be accepted.\r\n\r\nNewWithEnv(client.Config): create a new Client with values in\r\nenvironment variables.\r\n\r\nLike the existing New(), application must pass a client.Config object\r\nbecause there are some fields which isn't related to configuration\r\n(e.g. Transport).\r\n\r\nFixes https://github.com/coreos/etcd/issues/4008"},"comment":{"url":"https://api.github.com/repos/coreos/etcd/issues/comments/171886106","html_url":"https://github.com/coreos/etcd/pull/4144#issuecomment-171886106","issue_url":"https://api.github.com/repos/coreos/etcd/issues/4144","id":171886106,"user":{"login":"mitake","id":1173955,"avatar_url":"https://avatars.githubusercontent.com/u/1173955?v=3","gravatar_id":"","url":"https://api.github.com/users/mitake","html_url":"https://github.com/mitake","followers_url":"https://api.github.com/users/mitake/followers","following_url":"https://api.github.com/users/mitake/following{/other_user}","gists_url":"https://api.github.com/users/mitake/gists{/gist_id}","starred_url":"https://api.github.com/users/mitake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitake/subscriptions","organizations_url":"https://api.github.com/users/mitake/orgs","repos_url":"https://api.github.com/users/mitake/repos","events_url":"https://api.github.com/users/mitake/events{/privacy}","received_events_url":"https://api.github.com/users/mitake/received_events","type":"User","site_admin":false},"created_at":"2016-01-15T06:59:49Z","updated_at":"2016-01-15T06:59:49Z","body":"Then, could you add viper? Really sorry for that... I'll update this PR soon."}}