Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
812b2b64
Commit
812b2b64
authored
Jun 15, 2011
by
David Symonds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mail: cosmetic fixes.
R=rsc, gri CC=golang-dev
https://golang.org/cl/4602062
parent
1a4681ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
src/pkg/mail/message.go
src/pkg/mail/message.go
+3
-3
src/pkg/mail/message_test.go
src/pkg/mail/message_test.go
+1
-2
No files found.
src/pkg/mail/message.go
View file @
812b2b64
...
...
@@ -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.
...
...
src/pkg/mail/message_test.go
View file @
812b2b64
...
...
@@ -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
)
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment