{"action":"created","comment":{"url":"https://api.github.com/repos/go-ldap/ldap/pulls/comments/221722879","pull_request_review_id":160442530,"id":221722879,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTcyMjg3OQ==","diff_hunk":"@@ -457,3 +497,18 @@ func (l *Conn) reader() {\n \t\t}\n \t}\n }\n+\n+// a variation of net.SplitHostPort which returns string as port if not specified.\n+func splitHostAndPort(hostport string) (string, string, error) {\n+\n+\tif hostport == \"\" {\n+\t\treturn \"\", \"\", errors.New(\"Empty hostport provided\")\n+\t}\n+\n+\t// make golang < 1.8 compatible\n+\ti := strings.LastIndexByte(hostport, ':')\n+\tif i == -1 || i < strings.IndexByte(hostport, ']') {","path":"conn.go","position":86,"original_position":75,"commit_id":"6bcc62b73783b5421081dca4cb048ed83bb56c20","original_commit_id":"1646de61171e5c5e00865136abe12c1d0020572b","user":{"login":"kofemann","id":575965,"node_id":"MDQ6VXNlcjU3NTk2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/575965?v=4","gravatar_id":"","url":"https://api.github.com/users/kofemann","html_url":"https://github.com/kofemann","followers_url":"https://api.github.com/users/kofemann/followers","following_url":"https://api.github.com/users/kofemann/following{/other_user}","gists_url":"https://api.github.com/users/kofemann/gists{/gist_id}","starred_url":"https://api.github.com/users/kofemann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kofemann/subscriptions","organizations_url":"https://api.github.com/users/kofemann/orgs","repos_url":"https://api.github.com/users/kofemann/repos","events_url":"https://api.github.com/users/kofemann/events{/privacy}","received_events_url":"https://api.github.com/users/kofemann/received_events","type":"User","site_admin":false},"body":"SplitHostPort returns an error when port is not specified. This makes it hard to identify invalid string from missing port, unless we want to parse the error.","created_at":"2018-10-01T19:09:52Z","updated_at":"2018-10-01T19:09:52Z","html_url":"https://github.com/go-ldap/ldap/pull/184#discussion_r221722879","pull_request_url":"https://api.github.com/repos/go-ldap/ldap/pulls/184","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/go-ldap/ldap/pulls/comments/221722879"},"html":{"href":"https://github.com/go-ldap/ldap/pull/184#discussion_r221722879"},"pull_request":{"href":"https://api.github.com/repos/go-ldap/ldap/pulls/184"}},"in_reply_to_id":221433688},"pull_request":{"url":"https://api.github.com/repos/go-ldap/ldap/pulls/184","id":217910717,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3OTEwNzE3","html_url":"https://github.com/go-ldap/ldap/pull/184","diff_url":"https://github.com/go-ldap/ldap/pull/184.diff","patch_url":"https://github.com/go-ldap/ldap/pull/184.patch","issue_url":"https://api.github.com/repos/go-ldap/ldap/issues/184","number":184,"state":"open","locked":false,"title":"add DialURL function to simplify handling of ldap:// and ldaps:// urls","user":{"login":"kofemann","id":575965,"node_id":"MDQ6VXNlcjU3NTk2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/575965?v=4","gravatar_id":"","url":"https://api.github.com/users/kofemann","html_url":"https://github.com/kofemann","followers_url":"https://api.github.com/users/kofemann/followers","following_url":"https://api.github.com/users/kofemann/following{/other_user}","gists_url":"https://api.github.com/users/kofemann/gists{/gist_id}","starred_url":"https://api.github.com/users/kofemann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kofemann/subscriptions","organizations_url":"https://api.github.com/users/kofemann/orgs","repos_url":"https://api.github.com/users/kofemann/repos","events_url":"https://api.github.com/users/kofemann/events{/privacy}","received_events_url":"https://api.github.com/users/kofemann/received_events","type":"User","site_admin":false},"body":"in some cases a client application wants simply to connect to an ldap\r\nserver based on provided ldap url. To simplify client-side code a\r\nconvenient function DialURL is added which based on provided url will\r\nuse plain tcp or tls connection. If no port number is provided, the\r\nstandard ports defined by IANA is used: 389 for plain and 636 for ssl\r\nconnections.","created_at":"2018-09-25T09:24:40Z","updated_at":"2018-10-01T19:09:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cda1fb7fadb770dcfe4e8b9da0d1de30277f5295","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/go-ldap/ldap/pulls/184/commits","review_comments_url":"https://api.github.com/repos/go-ldap/ldap/pulls/184/comments","review_comment_url":"https://api.github.com/repos/go-ldap/ldap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/go-ldap/ldap/issues/184/comments","statuses_url":"https://api.github.com/repos/go-ldap/ldap/statuses/6bcc62b73783b5421081dca4cb048ed83bb56c20","head":{"label":"kofemann:add-dial-url","ref":"add-dial-url","sha":"6bcc62b73783b5421081dca4cb048ed83bb56c20","user":{"login":"kofemann","id":575965,"node_id":"MDQ6VXNlcjU3NTk2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/575965?v=4","gravatar_id":"","url":"https://api.github.com/users/kofemann","html_url":"https://github.com/kofemann","followers_url":"https://api.github.com/users/kofemann/followers","following_url":"https://api.github.com/users/kofemann/following{/other_user}","gists_url":"https://api.github.com/users/kofemann/gists{/gist_id}","starred_url":"https://api.github.com/users/kofemann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kofemann/subscriptions","organizations_url":"https://api.github.com/users/kofemann/orgs","repos_url":"https://api.github.com/users/kofemann/repos","events_url":"https://api.github.com/users/kofemann/events{/privacy}","received_events_url":"https://api.github.com/users/kofemann/received_events","type":"User","site_admin":false},"repo":{"id":150235197,"node_id":"MDEwOlJlcG9zaXRvcnkxNTAyMzUxOTc=","name":"ldap","full_name":"kofemann/ldap","private":false,"owner":{"login":"kofemann","id":575965,"node_id":"MDQ6VXNlcjU3NTk2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/575965?v=4","gravatar_id":"","url":"https://api.github.com/users/kofemann","html_url":"https://github.com/kofemann","followers_url":"https://api.github.com/users/kofemann/followers","following_url":"https://api.github.com/users/kofemann/following{/other_user}","gists_url":"https://api.github.com/users/kofemann/gists{/gist_id}","starred_url":"https://api.github.com/users/kofemann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kofemann/subscriptions","organizations_url":"https://api.github.com/users/kofemann/orgs","repos_url":"https://api.github.com/users/kofemann/repos","events_url":"https://api.github.com/users/kofemann/events{/privacy}","received_events_url":"https://api.github.com/users/kofemann/received_events","type":"User","site_admin":false},"html_url":"https://github.com/kofemann/ldap","description":"Basic LDAP v3 functionality for the GO programming language.","fork":true,"url":"https://api.github.com/repos/kofemann/ldap","forks_url":"https://api.github.com/repos/kofemann/ldap/forks","keys_url":"https://api.github.com/repos/kofemann/ldap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kofemann/ldap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kofemann/ldap/teams","hooks_url":"https://api.github.com/repos/kofemann/ldap/hooks","issue_events_url":"https://api.github.com/repos/kofemann/ldap/issues/events{/number}","events_url":"https://api.github.com/repos/kofemann/ldap/events","assignees_url":"https://api.github.com/repos/kofemann/ldap/assignees{/user}","branches_url":"https://api.github.com/repos/kofemann/ldap/branches{/branch}","tags_url":"https://api.github.com/repos/kofemann/ldap/tags","blobs_url":"https://api.github.com/repos/kofemann/ldap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kofemann/ldap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kofemann/ldap/git/refs{/sha}","trees_url":"https://api.github.com/repos/kofemann/ldap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kofemann/ldap/statuses/{sha}","languages_url":"https://api.github.com/repos/kofemann/ldap/languages","stargazers_url":"https://api.github.com/repos/kofemann/ldap/stargazers","contributors_url":"https://api.github.com/repos/kofemann/ldap/contributors","subscribers_url":"https://api.github.com/repos/kofemann/ldap/subscribers","subscription_url":"https://api.github.com/repos/kofemann/ldap/subscription","commits_url":"https://api.github.com/repos/kofemann/ldap/commits{/sha}","git_commits_url":"https://api.github.com/repos/kofemann/ldap/git/commits{/sha}","comments_url":"https://api.github.com/repos/kofemann/ldap/comments{/number}","issue_comment_url":"https://api.github.com/repos/kofemann/ldap/issues/comments{/number}","contents_url":"https://api.github.com/repos/kofemann/ldap/contents/{+path}","compare_url":"https://api.github.com/repos/kofemann/ldap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kofemann/ldap/merges","archive_url":"https://api.github.com/repos/kofemann/ldap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kofemann/ldap/downloads","issues_url":"https://api.github.com/repos/kofemann/ldap/issues{/number}","pulls_url":"https://api.github.com/repos/kofemann/ldap/pulls{/number}","milestones_url":"https://api.github.com/repos/kofemann/ldap/milestones{/number}","notifications_url":"https://api.github.com/repos/kofemann/ldap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kofemann/ldap/labels{/name}","releases_url":"https://api.github.com/repos/kofemann/ldap/releases{/id}","deployments_url":"https://api.github.com/repos/kofemann/ldap/deployments","created_at":"2018-09-25T08:53:18Z","updated_at":"2018-09-25T08:53:21Z","pushed_at":"2018-10-01T19:00:02Z","git_url":"git://github.com/kofemann/ldap.git","ssh_url":"git@github.com:kofemann/ldap.git","clone_url":"https://github.com/kofemann/ldap.git","svn_url":"https://github.com/kofemann/ldap","homepage":"","size":276,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"go-ldap:master","ref":"master","sha":"dc997b2033d4b4ab6de47b555eaf76888a81d33d","user":{"login":"go-ldap","id":9259991,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyNTk5OTE=","avatar_url":"https://avatars0.githubusercontent.com/u/9259991?v=4","gravatar_id":"","url":"https://api.github.com/users/go-ldap","html_url":"https://github.com/go-ldap","followers_url":"https://api.github.com/users/go-ldap/followers","following_url":"https://api.github.com/users/go-ldap/following{/other_user}","gists_url":"https://api.github.com/users/go-ldap/gists{/gist_id}","starred_url":"https://api.github.com/users/go-ldap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/go-ldap/subscriptions","organizations_url":"https://api.github.com/users/go-ldap/orgs","repos_url":"https://api.github.com/users/go-ldap/repos","events_url":"https://api.github.com/users/go-ldap/events{/privacy}","received_events_url":"https://api.github.com/users/go-ldap/received_events","type":"Organization","site_admin":false},"repo":{"id":25279567,"node_id":"MDEwOlJlcG9zaXRvcnkyNTI3OTU2Nw==","name":"ldap","full_name":"go-ldap/ldap","private":false,"owner":{"login":"go-ldap","id":9259991,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyNTk5OTE=","avatar_url":"https://avatars0.githubusercontent.com/u/9259991?v=4","gravatar_id":"","url":"https://api.github.com/users/go-ldap","html_url":"https://github.com/go-ldap","followers_url":"https://api.github.com/users/go-ldap/followers","following_url":"https://api.github.com/users/go-ldap/following{/other_user}","gists_url":"https://api.github.com/users/go-ldap/gists{/gist_id}","starred_url":"https://api.github.com/users/go-ldap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/go-ldap/subscriptions","organizations_url":"https://api.github.com/users/go-ldap/orgs","repos_url":"https://api.github.com/users/go-ldap/repos","events_url":"https://api.github.com/users/go-ldap/events{/privacy}","received_events_url":"https://api.github.com/users/go-ldap/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/go-ldap/ldap","description":"Basic LDAP v3 functionality for the GO programming language.","fork":false,"url":"https://api.github.com/repos/go-ldap/ldap","forks_url":"https://api.github.com/repos/go-ldap/ldap/forks","keys_url":"https://api.github.com/repos/go-ldap/ldap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/go-ldap/ldap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/go-ldap/ldap/teams","hooks_url":"https://api.github.com/repos/go-ldap/ldap/hooks","issue_events_url":"https://api.github.com/repos/go-ldap/ldap/issues/events{/number}","events_url":"https://api.github.com/repos/go-ldap/ldap/events","assignees_url":"https://api.github.com/repos/go-ldap/ldap/assignees{/user}","branches_url":"https://api.github.com/repos/go-ldap/ldap/branches{/branch}","tags_url":"https://api.github.com/repos/go-ldap/ldap/tags","blobs_url":"https://api.github.com/repos/go-ldap/ldap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/go-ldap/ldap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/go-ldap/ldap/git/refs{/sha}","trees_url":"https://api.github.com/repos/go-ldap/ldap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/go-ldap/ldap/statuses/{sha}","languages_url":"https://api.github.com/repos/go-ldap/ldap/languages","stargazers_url":"https://api.github.com/repos/go-ldap/ldap/stargazers","contributors_url":"https://api.github.com/repos/go-ldap/ldap/contributors","subscribers_url":"https://api.github.com/repos/go-ldap/ldap/subscribers","subscription_url":"https://api.github.com/repos/go-ldap/ldap/subscription","commits_url":"https://api.github.com/repos/go-ldap/ldap/commits{/sha}","git_commits_url":"https://api.github.com/repos/go-ldap/ldap/git/commits{/sha}","comments_url":"https://api.github.com/repos/go-ldap/ldap/comments{/number}","issue_comment_url":"https://api.github.com/repos/go-ldap/ldap/issues/comments{/number}","contents_url":"https://api.github.com/repos/go-ldap/ldap/contents/{+path}","compare_url":"https://api.github.com/repos/go-ldap/ldap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/go-ldap/ldap/merges","archive_url":"https://api.github.com/repos/go-ldap/ldap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/go-ldap/ldap/downloads","issues_url":"https://api.github.com/repos/go-ldap/ldap/issues{/number}","pulls_url":"https://api.github.com/repos/go-ldap/ldap/pulls{/number}","milestones_url":"https://api.github.com/repos/go-ldap/ldap/milestones{/number}","notifications_url":"https://api.github.com/repos/go-ldap/ldap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/go-ldap/ldap/labels{/name}","releases_url":"https://api.github.com/repos/go-ldap/ldap/releases{/id}","deployments_url":"https://api.github.com/repos/go-ldap/ldap/deployments","created_at":"2014-10-16T00:33:17Z","updated_at":"2018-10-01T00:19:01Z","pushed_at":"2018-10-01T19:00:04Z","git_url":"git://github.com/go-ldap/ldap.git","ssh_url":"git@github.com:go-ldap/ldap.git","clone_url":"https://github.com/go-ldap/ldap.git","svn_url":"https://github.com/go-ldap/ldap","homepage":"","size":267,"stargazers_count":545,"watchers_count":545,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":123,"mirror_url":null,"archived":false,"open_issues_count":56,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":123,"open_issues":56,"watchers":545,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/go-ldap/ldap/pulls/184"},"html":{"href":"https://github.com/go-ldap/ldap/pull/184"},"issue":{"href":"https://api.github.com/repos/go-ldap/ldap/issues/184"},"comments":{"href":"https://api.github.com/repos/go-ldap/ldap/issues/184/comments"},"review_comments":{"href":"https://api.github.com/repos/go-ldap/ldap/pulls/184/comments"},"review_comment":{"href":"https://api.github.com/repos/go-ldap/ldap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/go-ldap/ldap/pulls/184/commits"},"statuses":{"href":"https://api.github.com/repos/go-ldap/ldap/statuses/6bcc62b73783b5421081dca4cb048ed83bb56c20"}},"author_association":"NONE"}}
{"actor":{"display_login":"kofemann"}}