← All notes

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

Sources

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

Permanent ID: iil:note:jppy3dp5

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.},
}

Markdown

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.

All artifact files (JSON index)

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.