Standard library / net/textproto
textproto.Reader.ReadContinuedLineBytes()
Return the unfolded continuation line as bytes. Expected stdout: 'hello world\n'.
Formal Syntax & Structure
go syntaxgo
func (r *Reader) ReadContinuedLineBytes() ([]byte, error)Return Value
([]byte, error)
Unfolded line bytes and error.
Working Example
Example Snippetgo
package main
import ( "bufio" "fmt" "net/textproto" "strings")
func main() { r := textproto.NewReader(bufio.NewReader(strings.NewReader("hello\r\n\tworld\r\n"))) fmt.Println(string(must(r.ReadContinuedLineBytes())))}
func must[T any](v T, e error) T { if e != nil { panic(e) } return v}func check(e error) { if e != nil { panic(e) }}