{"action":"closed","number":75,"pull_request":{"url":"https://api.github.com/repos/asaskevich/govalidator/pulls/75","id":40543319,"html_url":"https://github.com/asaskevich/govalidator/pull/75","diff_url":"https://github.com/asaskevich/govalidator/pull/75.diff","patch_url":"https://github.com/asaskevich/govalidator/pull/75.patch","issue_url":"https://api.github.com/repos/asaskevich/govalidator/issues/75","number":75,"state":"closed","locked":false,"title":"Make typeCheck compatible with pointer to non-struct","user":{"login":"hermanbergwerf","id":4458965,"avatar_url":"https://avatars.githubusercontent.com/u/4458965?v=3","gravatar_id":"","url":"https://api.github.com/users/hermanbergwerf","html_url":"https://github.com/hermanbergwerf","followers_url":"https://api.github.com/users/hermanbergwerf/followers","following_url":"https://api.github.com/users/hermanbergwerf/following{/other_user}","gists_url":"https://api.github.com/users/hermanbergwerf/gists{/gist_id}","starred_url":"https://api.github.com/users/hermanbergwerf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hermanbergwerf/subscriptions","organizations_url":"https://api.github.com/users/hermanbergwerf/orgs","repos_url":"https://api.github.com/users/hermanbergwerf/repos","events_url":"https://api.github.com/users/hermanbergwerf/events{/privacy}","received_events_url":"https://api.github.com/users/hermanbergwerf/received_events","type":"User","site_admin":false},"body":"`StructValidate` fails to parse structs that contain pointers to non-structs like strings or booleans. The `typeCheck` will call `StructValidate` for all `reflect.Ptr` and `reflect.Interface` values. If A non-struct pointer is passed to `StructValidate` it will return an error (*function only accepts structs; got reflect.Value*) I added a test case for this behaviour and a fix in `typeCheck`. The element from a `reflect.Ptr` value is now passed to `typeCheck` where it is eventually send to `StructValidate` if it is a `reflect.Struct`. Optionally you could do the check without a recursive call to boost performance but that's up to you.\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/asaskevich/govalidator/75)\n<!-- Reviewable:end -->\n","created_at":"2015-07-22T08:57:38Z","updated_at":"2015-07-22T14:31:11Z","closed_at":"2015-07-22T14:31:11Z","merged_at":"2015-07-22T14:31:11Z","merge_commit_sha":"4dba8d5d9ecc79a5cb1614fb0c5c4f6a267374d6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/asaskevich/govalidator/pulls/75/commits","review_comments_url":"https://api.github.com/repos/asaskevich/govalidator/pulls/75/comments","review_comment_url":"https://api.github.com/repos/asaskevich/govalidator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/asaskevich/govalidator/issues/75/comments","statuses_url":"https://api.github.com/repos/asaskevich/govalidator/statuses/2b8008587ea3ce1e7ed7fb586c01c20db721f1e0","head":{"label":"hermanbergwerf:master","ref":"master","sha":"2b8008587ea3ce1e7ed7fb586c01c20db721f1e0","user":{"login":"hermanbergwerf","id":4458965,"avatar_url":"https://avatars.githubusercontent.com/u/4458965?v=3","gravatar_id":"","url":"https://api.github.com/users/hermanbergwerf","html_url":"https://github.com/hermanbergwerf","followers_url":"https://api.github.com/users/hermanbergwerf/followers","following_url":"https://api.github.com/users/hermanbergwerf/following{/other_user}","gists_url":"https://api.github.com/users/hermanbergwerf/gists{/gist_id}","starred_url":"https://api.github.com/users/hermanbergwerf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hermanbergwerf/subscriptions","organizations_url":"https://api.github.com/users/hermanbergwerf/orgs","repos_url":"https://api.github.com/users/hermanbergwerf/repos","events_url":"https://api.github.com/users/hermanbergwerf/events{/privacy}","received_events_url":"https://api.github.com/users/hermanbergwerf/received_events","type":"User","site_admin":false},"repo":{"id":39493109,"name":"govalidator","full_name":"hermanbergwerf/govalidator","owner":{"login":"hermanbergwerf","id":4458965,"avatar_url":"https://avatars.githubusercontent.com/u/4458965?v=3","gravatar_id":"","url":"https://api.github.com/users/hermanbergwerf","html_url":"https://github.com/hermanbergwerf","followers_url":"https://api.github.com/users/hermanbergwerf/followers","following_url":"https://api.github.com/users/hermanbergwerf/following{/other_user}","gists_url":"https://api.github.com/users/hermanbergwerf/gists{/gist_id}","starred_url":"https://api.github.com/users/hermanbergwerf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hermanbergwerf/subscriptions","organizations_url":"https://api.github.com/users/hermanbergwerf/orgs","repos_url":"https://api.github.com/users/hermanbergwerf/repos","events_url":"https://api.github.com/users/hermanbergwerf/events{/privacy}","received_events_url":"https://api.github.com/users/hermanbergwerf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hermanbergwerf/govalidator","description":"[Go] Package of validators and sanitizers for strings, numerics, slices and structs","fork":true,"url":"https://api.github.com/repos/hermanbergwerf/govalidator","forks_url":"https://api.github.com/repos/hermanbergwerf/govalidator/forks","keys_url":"https://api.github.com/repos/hermanbergwerf/govalidator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hermanbergwerf/govalidator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hermanbergwerf/govalidator/teams","hooks_url":"https://api.github.com/repos/hermanbergwerf/govalidator/hooks","issue_events_url":"https://api.github.com/repos/hermanbergwerf/govalidator/issues/events{/number}","events_url":"https://api.github.com/repos/hermanbergwerf/govalidator/events","assignees_url":"https://api.github.com/repos/hermanbergwerf/govalidator/assignees{/user}","branches_url":"https://api.github.com/repos/hermanbergwerf/govalidator/branches{/branch}","tags_url":"https://api.github.com/repos/hermanbergwerf/govalidator/tags","blobs_url":"https://api.github.com/repos/hermanbergwerf/govalidator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hermanbergwerf/govalidator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hermanbergwerf/govalidator/git/refs{/sha}","trees_url":"https://api.github.com/repos/hermanbergwerf/govalidator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hermanbergwerf/govalidator/statuses/{sha}","languages_url":"https://api.github.com/repos/hermanbergwerf/govalidator/languages","stargazers_url":"https://api.github.com/repos/hermanbergwerf/govalidator/stargazers","contributors_url":"https://api.github.com/repos/hermanbergwerf/govalidator/contributors","subscribers_url":"https://api.github.com/repos/hermanbergwerf/govalidator/subscribers","subscription_url":"https://api.github.com/repos/hermanbergwerf/govalidator/subscription","commits_url":"https://api.github.com/repos/hermanbergwerf/govalidator/commits{/sha}","git_commits_url":"https://api.github.com/repos/hermanbergwerf/govalidator/git/commits{/sha}","comments_url":"https://api.github.com/repos/hermanbergwerf/govalidator/comments{/number}","issue_comment_url":"https://api.github.com/repos/hermanbergwerf/govalidator/issues/comments{/number}","contents_url":"https://api.github.com/repos/hermanbergwerf/govalidator/contents/{+path}","compare_url":"https://api.github.com/repos/hermanbergwerf/govalidator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hermanbergwerf/govalidator/merges","archive_url":"https://api.github.com/repos/hermanbergwerf/govalidator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hermanbergwerf/govalidator/downloads","issues_url":"https://api.github.com/repos/hermanbergwerf/govalidator/issues{/number}","pulls_url":"https://api.github.com/repos/hermanbergwerf/govalidator/pulls{/number}","milestones_url":"https://api.github.com/repos/hermanbergwerf/govalidator/milestones{/number}","notifications_url":"https://api.github.com/repos/hermanbergwerf/govalidator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hermanbergwerf/govalidator/labels{/name}","releases_url":"https://api.github.com/repos/hermanbergwerf/govalidator/releases{/id}","created_at":"2015-07-22T07:52:23Z","updated_at":"2015-07-22T07:52:23Z","pushed_at":"2015-07-22T08:37:42Z","git_url":"git://github.com/hermanbergwerf/govalidator.git","ssh_url":"git@github.com:hermanbergwerf/govalidator.git","clone_url":"https://github.com/hermanbergwerf/govalidator.git","svn_url":"https://github.com/hermanbergwerf/govalidator","homepage":"","size":815,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"asaskevich:master","ref":"master","sha":"5fe52de9fffecc6df9539fcfd6ac6ae6aa6fc626","user":{"login":"asaskevich","id":5049590,"avatar_url":"https://avatars.githubusercontent.com/u/5049590?v=3","gravatar_id":"","url":"https://api.github.com/users/asaskevich","html_url":"https://github.com/asaskevich","followers_url":"https://api.github.com/users/asaskevich/followers","following_url":"https://api.github.com/users/asaskevich/following{/other_user}","gists_url":"https://api.github.com/users/asaskevich/gists{/gist_id}","starred_url":"https://api.github.com/users/asaskevich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asaskevich/subscriptions","organizations_url":"https://api.github.com/users/asaskevich/orgs","repos_url":"https://api.github.com/users/asaskevich/repos","events_url":"https://api.github.com/users/asaskevich/events{/privacy}","received_events_url":"https://api.github.com/users/asaskevich/received_events","type":"User","site_admin":false},"repo":{"id":21034555,"name":"govalidator","full_name":"asaskevich/govalidator","owner":{"login":"asaskevich","id":5049590,"avatar_url":"https://avatars.githubusercontent.com/u/5049590?v=3","gravatar_id":"","url":"https://api.github.com/users/asaskevich","html_url":"https://github.com/asaskevich","followers_url":"https://api.github.com/users/asaskevich/followers","following_url":"https://api.github.com/users/asaskevich/following{/other_user}","gists_url":"https://api.github.com/users/asaskevich/gists{/gist_id}","starred_url":"https://api.github.com/users/asaskevich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asaskevich/subscriptions","organizations_url":"https://api.github.com/users/asaskevich/orgs","repos_url":"https://api.github.com/users/asaskevich/repos","events_url":"https://api.github.com/users/asaskevich/events{/privacy}","received_events_url":"https://api.github.com/users/asaskevich/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/asaskevich/govalidator","description":"[Go] Package of validators and sanitizers for strings, numerics, slices and structs","fork":false,"url":"https://api.github.com/repos/asaskevich/govalidator","forks_url":"https://api.github.com/repos/asaskevich/govalidator/forks","keys_url":"https://api.github.com/repos/asaskevich/govalidator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asaskevich/govalidator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asaskevich/govalidator/teams","hooks_url":"https://api.github.com/repos/asaskevich/govalidator/hooks","issue_events_url":"https://api.github.com/repos/asaskevich/govalidator/issues/events{/number}","events_url":"https://api.github.com/repos/asaskevich/govalidator/events","assignees_url":"https://api.github.com/repos/asaskevich/govalidator/assignees{/user}","branches_url":"https://api.github.com/repos/asaskevich/govalidator/branches{/branch}","tags_url":"https://api.github.com/repos/asaskevich/govalidator/tags","blobs_url":"https://api.github.com/repos/asaskevich/govalidator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asaskevich/govalidator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asaskevich/govalidator/git/refs{/sha}","trees_url":"https://api.github.com/repos/asaskevich/govalidator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asaskevich/govalidator/statuses/{sha}","languages_url":"https://api.github.com/repos/asaskevich/govalidator/languages","stargazers_url":"https://api.github.com/repos/asaskevich/govalidator/stargazers","contributors_url":"https://api.github.com/repos/asaskevich/govalidator/contributors","subscribers_url":"https://api.github.com/repos/asaskevich/govalidator/subscribers","subscription_url":"https://api.github.com/repos/asaskevich/govalidator/subscription","commits_url":"https://api.github.com/repos/asaskevich/govalidator/commits{/sha}","git_commits_url":"https://api.github.com/repos/asaskevich/govalidator/git/commits{/sha}","comments_url":"https://api.github.com/repos/asaskevich/govalidator/comments{/number}","issue_comment_url":"https://api.github.com/repos/asaskevich/govalidator/issues/comments{/number}","contents_url":"https://api.github.com/repos/asaskevich/govalidator/contents/{+path}","compare_url":"https://api.github.com/repos/asaskevich/govalidator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asaskevich/govalidator/merges","archive_url":"https://api.github.com/repos/asaskevich/govalidator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asaskevich/govalidator/downloads","issues_url":"https://api.github.com/repos/asaskevich/govalidator/issues{/number}","pulls_url":"https://api.github.com/repos/asaskevich/govalidator/pulls{/number}","milestones_url":"https://api.github.com/repos/asaskevich/govalidator/milestones{/number}","notifications_url":"https://api.github.com/repos/asaskevich/govalidator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asaskevich/govalidator/labels{/name}","releases_url":"https://api.github.com/repos/asaskevich/govalidator/releases{/id}","created_at":"2014-06-20T10:45:23Z","updated_at":"2015-07-22T02:26:58Z","pushed_at":"2015-07-22T14:31:10Z","git_url":"git://github.com/asaskevich/govalidator.git","ssh_url":"git@github.com:asaskevich/govalidator.git","clone_url":"https://github.com/asaskevich/govalidator.git","svn_url":"https://github.com/asaskevich/govalidator","homepage":"","size":815,"stargazers_count":548,"watchers_count":548,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":9,"forks":47,"open_issues":9,"watchers":548,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/asaskevich/govalidator/pulls/75"},"html":{"href":"https://github.com/asaskevich/govalidator/pull/75"},"issue":{"href":"https://api.github.com/repos/asaskevich/govalidator/issues/75"},"comments":{"href":"https://api.github.com/repos/asaskevich/govalidator/issues/75/comments"},"review_comments":{"href":"https://api.github.com/repos/asaskevich/govalidator/pulls/75/comments"},"review_comment":{"href":"https://api.github.com/repos/asaskevich/govalidator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/asaskevich/govalidator/pulls/75/commits"},"statuses":{"href":"https://api.github.com/repos/asaskevich/govalidator/statuses/2b8008587ea3ce1e7ed7fb586c01c20db721f1e0"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"asaskevich","id":5049590,"avatar_url":"https://avatars.githubusercontent.com/u/5049590?v=3","gravatar_id":"","url":"https://api.github.com/users/asaskevich","html_url":"https://github.com/asaskevich","followers_url":"https://api.github.com/users/asaskevich/followers","following_url":"https://api.github.com/users/asaskevich/following{/other_user}","gists_url":"https://api.github.com/users/asaskevich/gists{/gist_id}","starred_url":"https://api.github.com/users/asaskevich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asaskevich/subscriptions","organizations_url":"https://api.github.com/users/asaskevich/orgs","repos_url":"https://api.github.com/users/asaskevich/repos","events_url":"https://api.github.com/users/asaskevich/events{/privacy}","received_events_url":"https://api.github.com/users/asaskevich/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":2,"additions":42,"deletions":3,"changed_files":2}}