Go net/textproto: text request and response protocols
Answer: This package supports text request and response protocols styled like HTTP, NNTP, and SMTP.
What it provides
RFC 9112 defines the HTTP 1.1 character set that header keys and values must follow.
Error is a numeric error response from a server.
A client can use Pipeline to manage pipelined requests and responses.
Reader can read numeric response code lines and key value headers.
It also reads whole text blocks that end with a dot on a line by itself.
Writing and connections
Writer writes text blocks in dot-encoded form.
Conn packages Reader, Writer, and Pipeline on a single network connection.
CanonicalMIMEHeaderKey returns the canonical form of a MIME header key.
See also
Claims
- id: C1 claim: The package supports text request and response protocols. source: S1 evidence: "generic support for text-based request/response protocols"
- id: C2 claim: The style matches HTTP, NNTP, and SMTP. source: S1 evidence: "in the style of HTTP, NNTP, and SMTP"
- id: C3 claim: Header keys and values follow the character set in RFC 9112. source: S2 evidence: "RFC 9112 for header keys and values"
- id: C4 claim: Pipeline manages pipelined requests and responses in a client. source: S2 evidence: "pipelined requests and responses"
Sources
- [S1] net/textproto package reference. Go. https://pkg.go.dev/net/textproto . License: BSD-3-Clause. Accessed 2026-11-24.
- [S2] net/textproto source. Go. https://go.dev/src/net/textproto/textproto.go . License: BSD-3-Clause. Accessed 2026-11-24.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Go, net/textproto package reference; Go, net/textproto source. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Go, net/textproto package reference; Go, net/textproto source. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors.
Cite this
iinventedlight. 2026. "Go net/textproto: text request and response protocols." iinventedlight Library, iil:note:jppy3dp5, version of 2026-11-24. https://iinventedlight.com/library/notes/go-net-textproto/. License: CC-BY-4.0.
@misc{iil_note_jppy3dp5,
author = {{iinventedlight}},
title = {{Go net/textproto: text request and response protocols}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-24},
url = {https://iinventedlight.com/library/notes/go-net-textproto/},
note = {Permanent ID iil:note:jppy3dp5. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- go-net-textproto.schema.json (schema; CC-BY-4.0)
- go-net-textproto.table.json (table; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/go-net-textproto.md.