{"action":"created","comment":{"url":"https://api.github.com/repos/labstack/echo/pulls/comments/218832726","pull_request_review_id":156858215,"id":218832726,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODgzMjcyNg==","diff_hunk":"@@ -325,16 +325,15 @@ func (c *context) FormValue(name string) string {\n }\n \n func (c *context) FormParams() (url.Values, error) {\n-\tif strings.HasPrefix(c.request.Header.Get(HeaderContentType), MIMEMultipartForm) {\n-\t\tif err := c.request.ParseMultipartForm(defaultMemory); err != nil {\n-\t\t\treturn nil, err\n-\t\t}\n-\t} else {\n-\t\tif err := c.request.ParseForm(); err != nil {\n+\treq := c.Request()\n+\tif strings.HasPrefix(req.Header.Get(HeaderContentType), MIMEMultipartForm) {\n+\t\tif err := req.ParseMultipartForm(defaultMemory); err != nil {\n \t\t\treturn nil, err\n \t\t}\n+\t} else if err := req.ParseForm(); err != nil {","path":"context.go","position":15,"original_position":15,"commit_id":"14821017b381cff995c17acf8b8b50322ecbee2e","original_commit_id":"14821017b381cff995c17acf8b8b50322ecbee2e","user":{"login":"alexaandru","id":85237,"node_id":"MDQ6VXNlcjg1MjM3","avatar_url":"https://avatars1.githubusercontent.com/u/85237?v=4","gravatar_id":"","url":"https://api.github.com/users/alexaandru","html_url":"https://github.com/alexaandru","followers_url":"https://api.github.com/users/alexaandru/followers","following_url":"https://api.github.com/users/alexaandru/following{/other_user}","gists_url":"https://api.github.com/users/alexaandru/gists{/gist_id}","starred_url":"https://api.github.com/users/alexaandru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexaandru/subscriptions","organizations_url":"https://api.github.com/users/alexaandru/orgs","repos_url":"https://api.github.com/users/alexaandru/repos","events_url":"https://api.github.com/users/alexaandru/events{/privacy}","received_events_url":"https://api.github.com/users/alexaandru/received_events","type":"User","site_admin":false},"body":"I don't really understand how the `else if` can be dropped in this context... The way it is now, a request either has  `MIMEMultipartForm` content type and is processed accordingly OR (and this is where `else` comes into play) a simple form will be parsed. If you drop the else, then in case of successful multipart (thus no return on the `if` branch), you will ALSO parse it as a simple form (since, you have no else, and you don't return early either).  So I'm really curious to see how the else could be dropped in this context...","created_at":"2018-09-19T14:43:09Z","updated_at":"2018-09-19T14:43:09Z","html_url":"https://github.com/labstack/echo/pull/1192#discussion_r218832726","pull_request_url":"https://api.github.com/repos/labstack/echo/pulls/1192","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/labstack/echo/pulls/comments/218832726"},"html":{"href":"https://github.com/labstack/echo/pull/1192#discussion_r218832726"},"pull_request":{"href":"https://api.github.com/repos/labstack/echo/pulls/1192"}},"in_reply_to_id":218791843},"pull_request":{"url":"https://api.github.com/repos/labstack/echo/pulls/1192","id":214047706,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0MDQ3NzA2","html_url":"https://github.com/labstack/echo/pull/1192","diff_url":"https://github.com/labstack/echo/pull/1192.diff","patch_url":"https://github.com/labstack/echo/pull/1192.patch","issue_url":"https://api.github.com/repos/labstack/echo/issues/1192","number":1192,"state":"open","locked":false,"title":"Code cleanup","user":{"login":"ribice","id":5403700,"node_id":"MDQ6VXNlcjU0MDM3MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/5403700?v=4","gravatar_id":"","url":"https://api.github.com/users/ribice","html_url":"https://github.com/ribice","followers_url":"https://api.github.com/users/ribice/followers","following_url":"https://api.github.com/users/ribice/following{/other_user}","gists_url":"https://api.github.com/users/ribice/gists{/gist_id}","starred_url":"https://api.github.com/users/ribice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ribice/subscriptions","organizations_url":"https://api.github.com/users/ribice/orgs","repos_url":"https://api.github.com/users/ribice/repos","events_url":"https://api.github.com/users/ribice/events{/privacy}","received_events_url":"https://api.github.com/users/ribice/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-07T21:49:48Z","updated_at":"2018-09-19T14:43:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"564442f9c08812dd65cb0ce2a98195679da27360","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/labstack/echo/pulls/1192/commits","review_comments_url":"https://api.github.com/repos/labstack/echo/pulls/1192/comments","review_comment_url":"https://api.github.com/repos/labstack/echo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/labstack/echo/issues/1192/comments","statuses_url":"https://api.github.com/repos/labstack/echo/statuses/14821017b381cff995c17acf8b8b50322ecbee2e","head":{"label":"ribice:context-improvements","ref":"context-improvements","sha":"14821017b381cff995c17acf8b8b50322ecbee2e","user":{"login":"ribice","id":5403700,"node_id":"MDQ6VXNlcjU0MDM3MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/5403700?v=4","gravatar_id":"","url":"https://api.github.com/users/ribice","html_url":"https://github.com/ribice","followers_url":"https://api.github.com/users/ribice/followers","following_url":"https://api.github.com/users/ribice/following{/other_user}","gists_url":"https://api.github.com/users/ribice/gists{/gist_id}","starred_url":"https://api.github.com/users/ribice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ribice/subscriptions","organizations_url":"https://api.github.com/users/ribice/orgs","repos_url":"https://api.github.com/users/ribice/repos","events_url":"https://api.github.com/users/ribice/events{/privacy}","received_events_url":"https://api.github.com/users/ribice/received_events","type":"User","site_admin":false},"repo":null},"base":{"label":"labstack:master","ref":"master","sha":"688ab2bec63ffbfe80f4a82449c232103041e2f3","user":{"login":"labstack","id":2624634,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MjQ2MzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/2624634?v=4","gravatar_id":"","url":"https://api.github.com/users/labstack","html_url":"https://github.com/labstack","followers_url":"https://api.github.com/users/labstack/followers","following_url":"https://api.github.com/users/labstack/following{/other_user}","gists_url":"https://api.github.com/users/labstack/gists{/gist_id}","starred_url":"https://api.github.com/users/labstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/labstack/subscriptions","organizations_url":"https://api.github.com/users/labstack/orgs","repos_url":"https://api.github.com/users/labstack/repos","events_url":"https://api.github.com/users/labstack/events{/privacy}","received_events_url":"https://api.github.com/users/labstack/received_events","type":"Organization","site_admin":false},"repo":{"id":31504491,"node_id":"MDEwOlJlcG9zaXRvcnkzMTUwNDQ5MQ==","name":"echo","full_name":"labstack/echo","private":false,"owner":{"login":"labstack","id":2624634,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MjQ2MzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/2624634?v=4","gravatar_id":"","url":"https://api.github.com/users/labstack","html_url":"https://github.com/labstack","followers_url":"https://api.github.com/users/labstack/followers","following_url":"https://api.github.com/users/labstack/following{/other_user}","gists_url":"https://api.github.com/users/labstack/gists{/gist_id}","starred_url":"https://api.github.com/users/labstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/labstack/subscriptions","organizations_url":"https://api.github.com/users/labstack/orgs","repos_url":"https://api.github.com/users/labstack/repos","events_url":"https://api.github.com/users/labstack/events{/privacy}","received_events_url":"https://api.github.com/users/labstack/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/labstack/echo","description":"High performance, minimalist Go web framework","fork":false,"url":"https://api.github.com/repos/labstack/echo","forks_url":"https://api.github.com/repos/labstack/echo/forks","keys_url":"https://api.github.com/repos/labstack/echo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/labstack/echo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/labstack/echo/teams","hooks_url":"https://api.github.com/repos/labstack/echo/hooks","issue_events_url":"https://api.github.com/repos/labstack/echo/issues/events{/number}","events_url":"https://api.github.com/repos/labstack/echo/events","assignees_url":"https://api.github.com/repos/labstack/echo/assignees{/user}","branches_url":"https://api.github.com/repos/labstack/echo/branches{/branch}","tags_url":"https://api.github.com/repos/labstack/echo/tags","blobs_url":"https://api.github.com/repos/labstack/echo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/labstack/echo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/labstack/echo/git/refs{/sha}","trees_url":"https://api.github.com/repos/labstack/echo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/labstack/echo/statuses/{sha}","languages_url":"https://api.github.com/repos/labstack/echo/languages","stargazers_url":"https://api.github.com/repos/labstack/echo/stargazers","contributors_url":"https://api.github.com/repos/labstack/echo/contributors","subscribers_url":"https://api.github.com/repos/labstack/echo/subscribers","subscription_url":"https://api.github.com/repos/labstack/echo/subscription","commits_url":"https://api.github.com/repos/labstack/echo/commits{/sha}","git_commits_url":"https://api.github.com/repos/labstack/echo/git/commits{/sha}","comments_url":"https://api.github.com/repos/labstack/echo/comments{/number}","issue_comment_url":"https://api.github.com/repos/labstack/echo/issues/comments{/number}","contents_url":"https://api.github.com/repos/labstack/echo/contents/{+path}","compare_url":"https://api.github.com/repos/labstack/echo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/labstack/echo/merges","archive_url":"https://api.github.com/repos/labstack/echo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/labstack/echo/downloads","issues_url":"https://api.github.com/repos/labstack/echo/issues{/number}","pulls_url":"https://api.github.com/repos/labstack/echo/pulls{/number}","milestones_url":"https://api.github.com/repos/labstack/echo/milestones{/number}","notifications_url":"https://api.github.com/repos/labstack/echo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/labstack/echo/labels{/name}","releases_url":"https://api.github.com/repos/labstack/echo/releases{/id}","deployments_url":"https://api.github.com/repos/labstack/echo/deployments","created_at":"2015-03-01T17:43:01Z","updated_at":"2018-09-19T11:51:45Z","pushed_at":"2018-09-14T14:46:41Z","git_url":"git://github.com/labstack/echo.git","ssh_url":"git@github.com:labstack/echo.git","clone_url":"https://github.com/labstack/echo.git","svn_url":"https://github.com/labstack/echo","homepage":"https://echo.labstack.com","size":5097,"stargazers_count":11618,"watchers_count":11618,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1026,"mirror_url":null,"archived":false,"open_issues_count":144,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1026,"open_issues":144,"watchers":11618,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/labstack/echo/pulls/1192"},"html":{"href":"https://github.com/labstack/echo/pull/1192"},"issue":{"href":"https://api.github.com/repos/labstack/echo/issues/1192"},"comments":{"href":"https://api.github.com/repos/labstack/echo/issues/1192/comments"},"review_comments":{"href":"https://api.github.com/repos/labstack/echo/pulls/1192/comments"},"review_comment":{"href":"https://api.github.com/repos/labstack/echo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/labstack/echo/pulls/1192/commits"},"statuses":{"href":"https://api.github.com/repos/labstack/echo/statuses/14821017b381cff995c17acf8b8b50322ecbee2e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"alexaandru"}}