{"action":"created","issue":{"url":"https://api.github.com/repos/spf13/viper/issues/487","repository_url":"https://api.github.com/repos/spf13/viper","labels_url":"https://api.github.com/repos/spf13/viper/issues/487/labels{/name}","comments_url":"https://api.github.com/repos/spf13/viper/issues/487/comments","events_url":"https://api.github.com/repos/spf13/viper/issues/487/events","html_url":"https://github.com/spf13/viper/pull/487","id":316930834,"number":487,"title":"Allow Sub Viper to work with PFlags & nil check on binding PFlags","user":{"login":"losinggeneration","id":5209,"avatar_url":"https://avatars1.githubusercontent.com/u/5209?v=4","gravatar_id":"","url":"https://api.github.com/users/losinggeneration","html_url":"https://github.com/losinggeneration","followers_url":"https://api.github.com/users/losinggeneration/followers","following_url":"https://api.github.com/users/losinggeneration/following{/other_user}","gists_url":"https://api.github.com/users/losinggeneration/gists{/gist_id}","starred_url":"https://api.github.com/users/losinggeneration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/losinggeneration/subscriptions","organizations_url":"https://api.github.com/users/losinggeneration/orgs","repos_url":"https://api.github.com/users/losinggeneration/repos","events_url":"https://api.github.com/users/losinggeneration/events{/privacy}","received_events_url":"https://api.github.com/users/losinggeneration/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-23T18:32:42Z","updated_at":"2018-04-23T18:32:50Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/spf13/viper/pulls/487","html_url":"https://github.com/spf13/viper/pull/487","diff_url":"https://github.com/spf13/viper/pull/487.diff","patch_url":"https://github.com/spf13/viper/pull/487.patch"},"body":"`Sub` with pflags didn't work as I expected because the key prefix wasn't checked for flags. This should allow binding pflags to behave very similar to structured configurations loaded from files.\r\n\r\nThe nil check is needed since it's put into the pflagValue* structure that never checks if the PFlag pointer is valid.\r\n\r\nThis has code partially based on #331 for b7a4909 that uses the same `flag` name & updated comment for `flag`. Though the comment isn't totally correct for this PR, but #331 IMO should be merged.\r\n\r\nThis fixes #368 & #422 "},"comment":{"url":"https://api.github.com/repos/spf13/viper/issues/comments/383677266","html_url":"https://github.com/spf13/viper/pull/487#issuecomment-383677266","issue_url":"https://api.github.com/repos/spf13/viper/issues/487","id":383677266,"user":{"login":"CLAassistant","id":11571300,"avatar_url":"https://avatars1.githubusercontent.com/u/11571300?v=4","gravatar_id":"","url":"https://api.github.com/users/CLAassistant","html_url":"https://github.com/CLAassistant","followers_url":"https://api.github.com/users/CLAassistant/followers","following_url":"https://api.github.com/users/CLAassistant/following{/other_user}","gists_url":"https://api.github.com/users/CLAassistant/gists{/gist_id}","starred_url":"https://api.github.com/users/CLAassistant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CLAassistant/subscriptions","organizations_url":"https://api.github.com/users/CLAassistant/orgs","repos_url":"https://api.github.com/users/CLAassistant/repos","events_url":"https://api.github.com/users/CLAassistant/events{/privacy}","received_events_url":"https://api.github.com/users/CLAassistant/received_events","type":"User","site_admin":false},"created_at":"2018-04-23T18:32:50Z","updated_at":"2018-04-23T18:32:50Z","author_association":"NONE","body":"[![CLA assistant check](https://cla-assistant.io/pull/badge/not_signed)](https://cla-assistant.io/spf13/viper?pullRequest=487) <br/>Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our [Contributor License Agreement](https://cla-assistant.io/spf13/viper?pullRequest=487) before we can accept your contribution.<br/><sub>You have signed the CLA already but the status is still pending? Let us [recheck](https://cla-assistant.io/check/spf13/viper?pullRequest=487) it.</sub>"}}
{"actor":{"display_login":"CLAassistant"}}