Help us shape the future of Go! Take the 2026 Go Developer Survey

quotedstring

package
v3.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package quotedstring encodes values placed inside HTTP quoted strings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Escape

func Escape(raw string) string

Escape encodes raw for placement inside an RFC 9110 quoted-string. Quotes and backslashes use quoted-pair escaping, LF and CR use their conventional backslash forms, and other C0 controls plus DEL are percent-encoded. HTAB is encoded even though RFC 9110 permits it as qdtext. Non-ASCII bytes pass through verbatim. The returned value excludes the surrounding quotes. Escape is a serializer, not input validation; callers apply their own rejection or sanitization policy before calling it.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL