Documentation
¶
Index ¶
- Constants
- func Base64Lines(body []byte, width int) string
- func DecodeText(body []byte, charsetLabel string) (string, bool, string)
- func FilenameHint(disposition, rawURL, mimeType string) string
- func HexDump(body []byte, bytesPerLine int) string
- func HexPreview(body []byte) string
- type Kind
- type Meta
Constants ¶
View Source
const (
// default number of bytes shown per line in hex dumps.
HexDumpBytesPerLine = 16
)
Variables ¶
This section is empty.
Functions ¶
func Base64Lines ¶
Base64Lines wraps base64 output at a given width. Long base64 strings are unreadable and break terminal rendering, so we chunk them into lines like PEM files do.
func FilenameHint ¶
FilenameHint tries to figure out a good filename for saving a response. Order: 1) Content-Disposition header 2) URL path 3) MIME type extension 4) Fallback to "response.bin"
func HexPreview ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.