{"action":"created","comment":{"url":"https://api.github.com/repos/zalando/skipper/pulls/comments/42234913","id":42234913,"diff_hunk":"@@ -0,0 +1,37 @@\n+package flowid\n+\n+import (\n+\t\"crypto/rand\"\n+\t\"encoding/hex\"\n+\t\"errors\"\n+\t\"fmt\"\n+\t\"regexp\"\n+)\n+\n+const (\n+\tdefaultLen = 16\n+\tmaxLength  = 254\n+\tminLength  = 8\n+)\n+\n+var (\n+\tErrInvalidLen  = errors.New(fmt.Sprintf(\"Invalid length. len must be >= %d and < %d\", minLength, maxLength))\n+\tflowIdRegex, _ = regexp.Compile(`^[\\w+/=\\-]+$`)\n+)\n+\n+func newFlowId(len uint8) (string, error) {\n+\tif len < minLength || len > maxLength || len%2 != 0 {","path":"filters/flowid/hashing.go","position":23,"original_position":23,"commit_id":"7136091c7b4f3150de8c331cd90dc9c03c041787","original_commit_id":"7136091c7b4f3150de8c331cd90dc9c03c041787","user":{"login":"aryszka","id":733217,"avatar_url":"https://avatars.githubusercontent.com/u/733217?v=3","gravatar_id":"","url":"https://api.github.com/users/aryszka","html_url":"https://github.com/aryszka","followers_url":"https://api.github.com/users/aryszka/followers","following_url":"https://api.github.com/users/aryszka/following{/other_user}","gists_url":"https://api.github.com/users/aryszka/gists{/gist_id}","starred_url":"https://api.github.com/users/aryszka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aryszka/subscriptions","organizations_url":"https://api.github.com/users/aryszka/orgs","repos_url":"https://api.github.com/users/aryszka/repos","events_url":"https://api.github.com/users/aryszka/events{/privacy}","received_events_url":"https://api.github.com/users/aryszka/received_events","type":"User","site_admin":false},"body":"if it works, it works. just a warning that i managed once to trigger very strange behavior from the compiler by overdefining 'make' and it resulted in a relatively hard-to-figure compilation error.","created_at":"2015-10-16T11:59:59Z","updated_at":"2015-10-16T11:59:59Z","html_url":"https://github.com/zalando/skipper/pull/23#discussion_r42234913","pull_request_url":"https://api.github.com/repos/zalando/skipper/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/zalando/skipper/pulls/comments/42234913"},"html":{"href":"https://github.com/zalando/skipper/pull/23#discussion_r42234913"},"pull_request":{"href":"https://api.github.com/repos/zalando/skipper/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/zalando/skipper/pulls/23","id":47829728,"html_url":"https://github.com/zalando/skipper/pull/23","diff_url":"https://github.com/zalando/skipper/pull/23.diff","patch_url":"https://github.com/zalando/skipper/pull/23.patch","issue_url":"https://api.github.com/repos/zalando/skipper/issues/23","number":23,"state":"open","locked":false,"title":"Feature #18 add x flow","user":{"login":"lmineiro","id":4234681,"avatar_url":"https://avatars.githubusercontent.com/u/4234681?v=3","gravatar_id":"","url":"https://api.github.com/users/lmineiro","html_url":"https://github.com/lmineiro","followers_url":"https://api.github.com/users/lmineiro/followers","following_url":"https://api.github.com/users/lmineiro/following{/other_user}","gists_url":"https://api.github.com/users/lmineiro/gists{/gist_id}","starred_url":"https://api.github.com/users/lmineiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmineiro/subscriptions","organizations_url":"https://api.github.com/users/lmineiro/orgs","repos_url":"https://api.github.com/users/lmineiro/repos","events_url":"https://api.github.com/users/lmineiro/events{/privacy}","received_events_url":"https://api.github.com/users/lmineiro/received_events","type":"User","site_admin":false},"body":"The implementation generates a random hexadecimal string with 8 to 254 bytes and sets a HTTP header `X-Flow-Id` that other systems can use to correlate log entries.\r\nThe filter accepts some parameters that help control the its behavior, namely, to accept an existing flow id and the length of the generated flow ids\r\nThis closes #18","created_at":"2015-10-15T19:21:13Z","updated_at":"2015-10-16T11:59:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c6ab9533f9db08948ca757e76e5c73f5a4d1d005","assignee":{"login":"aryszka","id":733217,"avatar_url":"https://avatars.githubusercontent.com/u/733217?v=3","gravatar_id":"","url":"https://api.github.com/users/aryszka","html_url":"https://github.com/aryszka","followers_url":"https://api.github.com/users/aryszka/followers","following_url":"https://api.github.com/users/aryszka/following{/other_user}","gists_url":"https://api.github.com/users/aryszka/gists{/gist_id}","starred_url":"https://api.github.com/users/aryszka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aryszka/subscriptions","organizations_url":"https://api.github.com/users/aryszka/orgs","repos_url":"https://api.github.com/users/aryszka/repos","events_url":"https://api.github.com/users/aryszka/events{/privacy}","received_events_url":"https://api.github.com/users/aryszka/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/zalando/skipper/pulls/23/commits","review_comments_url":"https://api.github.com/repos/zalando/skipper/pulls/23/comments","review_comment_url":"https://api.github.com/repos/zalando/skipper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zalando/skipper/issues/23/comments","statuses_url":"https://api.github.com/repos/zalando/skipper/statuses/7136091c7b4f3150de8c331cd90dc9c03c041787","head":{"label":"zalando:feature-#18-add-x-flow-id","ref":"feature-#18-add-x-flow-id","sha":"7136091c7b4f3150de8c331cd90dc9c03c041787","user":{"login":"zalando","id":1564818,"avatar_url":"https://avatars.githubusercontent.com/u/1564818?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando","html_url":"https://github.com/zalando","followers_url":"https://api.github.com/users/zalando/followers","following_url":"https://api.github.com/users/zalando/following{/other_user}","gists_url":"https://api.github.com/users/zalando/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando/subscriptions","organizations_url":"https://api.github.com/users/zalando/orgs","repos_url":"https://api.github.com/users/zalando/repos","events_url":"https://api.github.com/users/zalando/events{/privacy}","received_events_url":"https://api.github.com/users/zalando/received_events","type":"Organization","site_admin":false},"repo":{"id":38812664,"name":"skipper","full_name":"zalando/skipper","owner":{"login":"zalando","id":1564818,"avatar_url":"https://avatars.githubusercontent.com/u/1564818?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando","html_url":"https://github.com/zalando","followers_url":"https://api.github.com/users/zalando/followers","following_url":"https://api.github.com/users/zalando/following{/other_user}","gists_url":"https://api.github.com/users/zalando/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando/subscriptions","organizations_url":"https://api.github.com/users/zalando/orgs","repos_url":"https://api.github.com/users/zalando/repos","events_url":"https://api.github.com/users/zalando/events{/privacy}","received_events_url":"https://api.github.com/users/zalando/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zalando/skipper","description":"Skipper is an HTTP router acting as a reverse proxy with support for custom route definitions","fork":false,"url":"https://api.github.com/repos/zalando/skipper","forks_url":"https://api.github.com/repos/zalando/skipper/forks","keys_url":"https://api.github.com/repos/zalando/skipper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zalando/skipper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zalando/skipper/teams","hooks_url":"https://api.github.com/repos/zalando/skipper/hooks","issue_events_url":"https://api.github.com/repos/zalando/skipper/issues/events{/number}","events_url":"https://api.github.com/repos/zalando/skipper/events","assignees_url":"https://api.github.com/repos/zalando/skipper/assignees{/user}","branches_url":"https://api.github.com/repos/zalando/skipper/branches{/branch}","tags_url":"https://api.github.com/repos/zalando/skipper/tags","blobs_url":"https://api.github.com/repos/zalando/skipper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zalando/skipper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zalando/skipper/git/refs{/sha}","trees_url":"https://api.github.com/repos/zalando/skipper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zalando/skipper/statuses/{sha}","languages_url":"https://api.github.com/repos/zalando/skipper/languages","stargazers_url":"https://api.github.com/repos/zalando/skipper/stargazers","contributors_url":"https://api.github.com/repos/zalando/skipper/contributors","subscribers_url":"https://api.github.com/repos/zalando/skipper/subscribers","subscription_url":"https://api.github.com/repos/zalando/skipper/subscription","commits_url":"https://api.github.com/repos/zalando/skipper/commits{/sha}","git_commits_url":"https://api.github.com/repos/zalando/skipper/git/commits{/sha}","comments_url":"https://api.github.com/repos/zalando/skipper/comments{/number}","issue_comment_url":"https://api.github.com/repos/zalando/skipper/issues/comments{/number}","contents_url":"https://api.github.com/repos/zalando/skipper/contents/{+path}","compare_url":"https://api.github.com/repos/zalando/skipper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zalando/skipper/merges","archive_url":"https://api.github.com/repos/zalando/skipper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zalando/skipper/downloads","issues_url":"https://api.github.com/repos/zalando/skipper/issues{/number}","pulls_url":"https://api.github.com/repos/zalando/skipper/pulls{/number}","milestones_url":"https://api.github.com/repos/zalando/skipper/milestones{/number}","notifications_url":"https://api.github.com/repos/zalando/skipper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zalando/skipper/labels{/name}","releases_url":"https://api.github.com/repos/zalando/skipper/releases{/id}","created_at":"2015-07-09T09:54:40Z","updated_at":"2015-10-12T07:40:31Z","pushed_at":"2015-10-16T11:48:14Z","git_url":"git://github.com/zalando/skipper.git","ssh_url":"git@github.com:zalando/skipper.git","clone_url":"https://github.com/zalando/skipper.git","svn_url":"https://github.com/zalando/skipper","homepage":"","size":2380,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":6,"forks":2,"open_issues":6,"watchers":1,"default_branch":"master"}},"base":{"label":"zalando:master","ref":"master","sha":"1b8d714701f1ac07dec58fcc9f882c45258d3633","user":{"login":"zalando","id":1564818,"avatar_url":"https://avatars.githubusercontent.com/u/1564818?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando","html_url":"https://github.com/zalando","followers_url":"https://api.github.com/users/zalando/followers","following_url":"https://api.github.com/users/zalando/following{/other_user}","gists_url":"https://api.github.com/users/zalando/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando/subscriptions","organizations_url":"https://api.github.com/users/zalando/orgs","repos_url":"https://api.github.com/users/zalando/repos","events_url":"https://api.github.com/users/zalando/events{/privacy}","received_events_url":"https://api.github.com/users/zalando/received_events","type":"Organization","site_admin":false},"repo":{"id":38812664,"name":"skipper","full_name":"zalando/skipper","owner":{"login":"zalando","id":1564818,"avatar_url":"https://avatars.githubusercontent.com/u/1564818?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando","html_url":"https://github.com/zalando","followers_url":"https://api.github.com/users/zalando/followers","following_url":"https://api.github.com/users/zalando/following{/other_user}","gists_url":"https://api.github.com/users/zalando/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando/subscriptions","organizations_url":"https://api.github.com/users/zalando/orgs","repos_url":"https://api.github.com/users/zalando/repos","events_url":"https://api.github.com/users/zalando/events{/privacy}","received_events_url":"https://api.github.com/users/zalando/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zalando/skipper","description":"Skipper is an HTTP router acting as a reverse proxy with support for custom route definitions","fork":false,"url":"https://api.github.com/repos/zalando/skipper","forks_url":"https://api.github.com/repos/zalando/skipper/forks","keys_url":"https://api.github.com/repos/zalando/skipper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zalando/skipper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zalando/skipper/teams","hooks_url":"https://api.github.com/repos/zalando/skipper/hooks","issue_events_url":"https://api.github.com/repos/zalando/skipper/issues/events{/number}","events_url":"https://api.github.com/repos/zalando/skipper/events","assignees_url":"https://api.github.com/repos/zalando/skipper/assignees{/user}","branches_url":"https://api.github.com/repos/zalando/skipper/branches{/branch}","tags_url":"https://api.github.com/repos/zalando/skipper/tags","blobs_url":"https://api.github.com/repos/zalando/skipper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zalando/skipper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zalando/skipper/git/refs{/sha}","trees_url":"https://api.github.com/repos/zalando/skipper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zalando/skipper/statuses/{sha}","languages_url":"https://api.github.com/repos/zalando/skipper/languages","stargazers_url":"https://api.github.com/repos/zalando/skipper/stargazers","contributors_url":"https://api.github.com/repos/zalando/skipper/contributors","subscribers_url":"https://api.github.com/repos/zalando/skipper/subscribers","subscription_url":"https://api.github.com/repos/zalando/skipper/subscription","commits_url":"https://api.github.com/repos/zalando/skipper/commits{/sha}","git_commits_url":"https://api.github.com/repos/zalando/skipper/git/commits{/sha}","comments_url":"https://api.github.com/repos/zalando/skipper/comments{/number}","issue_comment_url":"https://api.github.com/repos/zalando/skipper/issues/comments{/number}","contents_url":"https://api.github.com/repos/zalando/skipper/contents/{+path}","compare_url":"https://api.github.com/repos/zalando/skipper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zalando/skipper/merges","archive_url":"https://api.github.com/repos/zalando/skipper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zalando/skipper/downloads","issues_url":"https://api.github.com/repos/zalando/skipper/issues{/number}","pulls_url":"https://api.github.com/repos/zalando/skipper/pulls{/number}","milestones_url":"https://api.github.com/repos/zalando/skipper/milestones{/number}","notifications_url":"https://api.github.com/repos/zalando/skipper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zalando/skipper/labels{/name}","releases_url":"https://api.github.com/repos/zalando/skipper/releases{/id}","created_at":"2015-07-09T09:54:40Z","updated_at":"2015-10-12T07:40:31Z","pushed_at":"2015-10-16T11:48:14Z","git_url":"git://github.com/zalando/skipper.git","ssh_url":"git@github.com:zalando/skipper.git","clone_url":"https://github.com/zalando/skipper.git","svn_url":"https://github.com/zalando/skipper","homepage":"","size":2380,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":6,"forks":2,"open_issues":6,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zalando/skipper/pulls/23"},"html":{"href":"https://github.com/zalando/skipper/pull/23"},"issue":{"href":"https://api.github.com/repos/zalando/skipper/issues/23"},"comments":{"href":"https://api.github.com/repos/zalando/skipper/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/zalando/skipper/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/zalando/skipper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zalando/skipper/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/zalando/skipper/statuses/7136091c7b4f3150de8c331cd90dc9c03c041787"}}}}