Skip to content

net/textproto: unclear statement about ReadContinuedLine #32493

Description

@pam4

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> (https://play.golang.org/p/Bsrs8-5bAft).

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.help wanted

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions