Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1801)

Issue 4867054: code review 4867054: mime: ParseMediaType returns os.Error now, not a nil map (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 7 months ago by bradfitz
Modified:
13 years, 7 months ago
Reviewers:
CC:
golang-dev, r
Visibility:
Public.

Description

mime: ParseMediaType returns os.Error now, not a nil map ParseMediaType previously documented that it always returned a non-nil map, but also documented that it returned a nil map to signal an error. That is confusing, contradictory and not Go-like. Now it returns (mediatype string, params map, os.Error).

Patch Set 1 #

Patch Set 2 : diff -r 53b068e61dd0 https://go.googlecode.com/hg #

Patch Set 3 : diff -r 53b068e61dd0 https://go.googlecode.com/hg #

Total comments: 1

Patch Set 4 : diff -r 233a0938ac15 https://go.googlecode.com/hg #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -28 lines) Patch
M src/pkg/http/request.go View 1 2 3 3 chunks +12 lines, -6 lines 0 comments Download
M src/pkg/mime/mediatype.go View 1 2 3 3 chunks +18 lines, -14 lines 0 comments Download
M src/pkg/mime/mediatype_test.go View 1 2 chunks +13 lines, -6 lines 0 comments Download
M src/pkg/mime/multipart/multipart.go View 1 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 6
bradfitz
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg
13 years, 7 months ago (2011-08-15 18:55:47 UTC) #1
r
can you please hold this off until my url change lands, i hope later today? ...
13 years, 7 months ago (2011-08-15 21:16:42 UTC) #2
r
never mind, i see it won't collide. -rob
13 years, 7 months ago (2011-08-15 21:17:08 UTC) #3
bradfitz
I'm in no rush. Either way. On Mon, Aug 15, 2011 at 2:17 PM, Rob ...
13 years, 7 months ago (2011-08-15 21:37:17 UTC) #4
r
LGTM http://codereview.appspot.com/4867054/diff/5001/src/pkg/mime/mediatype.go File src/pkg/mime/mediatype.go (right): http://codereview.appspot.com/4867054/diff/5001/src/pkg/mime/mediatype.go#newcode41 src/pkg/mime/mediatype.go:41: // The returned params maps from the lowercase ...
13 years, 7 months ago (2011-08-15 21:56:41 UTC) #5
bradfitz
13 years, 7 months ago (2011-08-18 19:51:26 UTC) #6
*** Submitted as http://code.google.com/p/go/source/detail?r=5e1502ab5e21 ***

mime: ParseMediaType returns os.Error now, not a nil map

ParseMediaType previously documented that it always returned
a non-nil map, but also documented that it returned a nil map
to signal an error.

That is confusing, contradictory and not Go-like.

Now it returns (mediatype string, params map, os.Error).

R=golang-dev, r
CC=golang-dev
http://codereview.appspot.com/4867054
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b