Documentation
¶
Overview ¶
Package printgo lets you print strings piece-by-piece, then get the whole text at once Wraps bytes.Buffer and strings.Builder with fmt-style print functions Use Print/Println/Printf to write content, get result with String() / Bytes()
printgo 包让你逐个打印字符串,最后一次性获取完整文本 包装 bytes.Buffer 和 strings.Builder,提供 fmt 风格的打印函数 使用 Print/Println/Printf 写入内容,通过 String() 或 Bytes() 获取结果
Index ¶
- type PTS
- func (pts *PTS) Fprintf(format string, args ...interface{}) (n int)
- func (pts *PTS) Fprintfln(format string, args ...interface{}) (n int)
- func (pts *PTS) Print(args ...interface{}) (n int)
- func (pts *PTS) Printf(format string, args ...interface{}) (n int)
- func (pts *PTS) Printfln(format string, args ...interface{}) (n int)
- func (pts *PTS) Println(args ...interface{}) (n int)
- type PTX
- func (ptx *PTX) Fprintf(format string, args ...interface{}) (n int)
- func (ptx *PTX) Fprintfln(format string, args ...interface{}) (n int)
- func (ptx *PTX) Print(args ...interface{}) (n int)
- func (ptx *PTX) Printf(format string, args ...interface{}) (n int)
- func (ptx *PTX) Printfln(format string, args ...interface{}) (n int)
- func (ptx *PTX) Println(args ...interface{}) (n int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PTS ¶
PTS is strings.Builder-based type with fmt-style methods Accumulates printed content and provides String method to get output
PTS 是基于 strings.Builder 的类型,具有 fmt 风格的方法 累积打印内容并提供 String 方法获取输出
func NewPTS ¶
func NewPTS() *PTS
NewPTS creates PTS based on strings.Builder Returns new instance to use with print operations
NewPTS 创建基于 strings.Builder 的 PTS 返回可用于打印操作的新实例
func (*PTS) Fprintf ¶
Fprintf formats and prints with custom format string Returns bytes written, panics on failure
Fprintf 使用自定义格式字符串格式化并打印 返回写入的字节数,出错时 panic
func (*PTS) Fprintfln ¶
Fprintfln formats and prints with newline appended Returns bytes written, panics on failure
Fprintfln 格式化打印并追加换行符 返回写入的字节数,出错时 panic
func (*PTS) Print ¶
Print prints args without newline Returns bytes written, panics on failure
Print 打印参数不追加换行符 返回写入的字节数,出错时 panic
func (*PTS) Printf ¶
Printf formats and prints with custom format string Returns bytes written, panics on failure
Printf 使用自定义格式字符串格式化并打印 返回写入的字节数,出错时 panic
type PTX ¶
PTX is bytes.Buffer-based type with fmt-style methods Accumulates printed content and provides String method to get output
PTX 是基于 bytes.Buffer 的类型,具有 fmt 风格的方法 累积打印内容并提供 String 方法获取输出
func NewPTX ¶
func NewPTX() *PTX
NewPTX creates PTX based on bytes.Buffer Returns new instance to use with print operations
NewPTX 创建基于 bytes.Buffer 的 PTX 返回可用于打印操作的新实例
func (*PTX) Fprintf ¶
Fprintf formats and prints with custom format string Returns bytes written, panics on failure
Fprintf 使用自定义格式字符串格式化并打印 返回写入的字节数,出错时 panic
func (*PTX) Fprintfln ¶
Fprintfln formats and prints with newline appended Returns bytes written, panics on failure
Fprintfln 格式化打印并追加换行符 返回写入的字节数,出错时 panic
func (*PTX) Print ¶
Print prints args without newline Returns bytes written, panics on failure
Print 打印参数不追加换行符 返回写入的字节数,出错时 panic
func (*PTX) Printf ¶
Printf formats and prints with custom format string Returns bytes written, panics on failure
Printf 使用自定义格式字符串格式化并打印 返回写入的字节数,出错时 panic