Documentation
¶
Overview ¶
Package text is an abstraction layer for different text formats.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LineWriter ¶
type LineWriter struct {
// contains filtered or unexported fields
}
LineWriter wraps an io.Writer with line-based buffering and writes in a separate routine.
func LineBuffered ¶
func LineBuffered(inner io.Writer) *LineWriter
func (*LineWriter) Flush ¶
func (w *LineWriter) Flush() error
func (*LineWriter) Unwrap ¶
func (w *LineWriter) Unwrap() io.Writer
type Writer ¶
type Writer interface { io.Writer Clone(io.Writer) Writer Unwrap() io.Writer Flush() error OK() Error() Redirect(string) Redirectf(string, ...any) Status(int, string) Statusf(int, string, ...any) Title(string) Titlef(string, ...any) Subtitle(string) Subtitlef(string, ...any) Text(string) Textf(string, ...any) Empty() Link(string, string) Linkf(string, string, ...any) Item(string) Itemf(string, ...any) Quote(string) Raw(string, string) Separator() }
Writer builds a textual response. The response is buffered: call [Writer.Flush] to flush the last chunk to the underlying io.Writer.
Directories
¶
Path | Synopsis |
---|---|
Package gmap builds gophermaps.
|
Package gmap builds gophermaps. |
Package gmi build Gemini responses.
|
Package gmi build Gemini responses. |
Package guppy builds Guppy responses.
|
Package guppy builds Guppy responses. |
Package plain converts HTML to plain text and vice versa.
|
Package plain converts HTML to plain text and vice versa. |
Click to show internal directories.
Click to hide internal directories.