You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to send a multi-line response, func (e *Error) Error() string should use the
separator "-" instead of " " in all lines but the last, in
compliance with text-based protocols such as SMTP.
Given the following snippet:
err := textproto.Error{Code: 250, Msg: "localhost at your
service.\nSTARTTLS\n8BITMIME"
fmt.Println(err.Error())
What is the expected output?
250-localhost at your service.
250-STARTTLS
250 8BITMIME
What do you see instead?
250 localhost at your service.
STARTTLS
8BITMIME
Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
Which operating system are you using?
linux_amd64
Which version are you using? (run 'go version')
go version go1.1.1 linux/amd64
Please provide any additional information below.
I provide a patch with an example implementation.
The behavior I explain is useful sometimes (e.g. the EHLO response in SMTP,
where the server must print each extension in a new line) and it's much
easier and readable to have the method manage it by itself instead of
having to define a helper function.
El 02/08/2013 07:57, <go@googlecode.com> escribi�
by ruizh.cj:
Attachments:
The text was updated successfully, but these errors were encountered: