]> Cypherpunks repositories - gostls13.git/commitdiff
mail: cosmetic fixes.
authorDavid Symonds <dsymonds@golang.org>
Tue, 14 Jun 2011 23:10:59 +0000 (09:10 +1000)
committerDavid Symonds <dsymonds@golang.org>
Tue, 14 Jun 2011 23:10:59 +0000 (09:10 +1000)
R=rsc, gri
CC=golang-dev
https://golang.org/cl/4602062

src/pkg/mail/message.go
src/pkg/mail/message_test.go

index 0f4a1913e100963a3a39b08f1480e919e3774e51..342e35f18c521505609814836522171bac17f935 100644 (file)
@@ -59,7 +59,7 @@ func ReadMessage(r io.Reader) (msg *Message, err os.Error) {
        return &Message{
                Header: Header(hdr),
                Body:   tp.R,
-       },nil
+       }, nil
 }
 
 // Layouts suitable for passing to time.Parse.
@@ -228,7 +228,7 @@ func (p *addrParser) parseAddress() (addr *Address, err os.Error) {
        if err == nil {
                return &Address{
                        Address: spec,
-               },err
+               }, err
        }
        debug.Printf("parseAddress: not an addr-spec: %v", err)
        debug.Printf("parseAddress: state is now %q", *p)
@@ -260,7 +260,7 @@ func (p *addrParser) parseAddress() (addr *Address, err os.Error) {
        return &Address{
                Name:    displayName,
                Address: spec,
-       },nil
+       }, nil
 }
 
 // consumeAddrSpec parses a single RFC 5322 addr-spec at the start of p.
index a3af90a2ee863878604590f203b89792a182235b..e1bcc89ee5f245e4ca2c5b62eaea3076d1ebe6d4 100644 (file)
@@ -229,7 +229,6 @@ func TestAddressParsing(t *testing.T) {
                },
                // Custom example of RFC 2047 "B"-encoded UTF-8 address.
                {
-                       // XXX: a different example
                        `=?UTF-8?B?SsO2cmc=?= <joerg@example.com>`,
                        []*Address{
                                &Address{
@@ -246,7 +245,7 @@ func TestAddressParsing(t *testing.T) {
                        continue
                }
                if !reflect.DeepEqual(addrs, test.exp) {
-                       t.Errorf("Parse of %q: got %+v, want %+v", test.addrsStr, *addrs[0], *test.exp[0])
+                       t.Errorf("Parse of %q: got %+v, want %+v", test.addrsStr, addrs, test.exp)
                }
        }
 }