Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/textproto: unclear statement about ReadContinuedLine #32493

pam4 opened this issue Jun 8, 2019 · 1 comment

net/textproto: unclear statement about ReadContinuedLine #32493

pam4 opened this issue Jun 8, 2019 · 1 comment


Copy link

@pam4 pam4 commented Jun 8, 2019

From the documentation:

A line consisting of only white space is never continued.

I can't make sense of the above statement.

var txt string
txt += "A \n" // line 1
txt += "  \n" // line 2
txt += " B\n" // line 3
tp := textproto.NewReader(bufio.NewReader(strings.NewReader(txt)))
s, err := tp.ReadContinuedLine()
fmt.Printf("%q %v\n", s, err)

Prints "A  B" <nil> (

Line 2 consists of only white space but it is "continued" (as it should be, I think).
I propose to clarify or remove the statement in question.

EDIT: It should probably read: "An empty line is never continued".


This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jul 10, 2019

Change mentions this issue: net/textproto: corrected documentation of empty line handling

@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
5 participants
You can’t perform that action at this time.