Documentation
¶
Overview ¶
Package text provides utilities to generate textual output.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasePrinter ¶
type BasePrinter struct{}
BasePrinter is the default printer for common use. It uses fmt.Sprintf underneath.
func (BasePrinter) Sprintf ¶
func (BasePrinter) Sprintf(msg string, val ...interface{}) string
Sprintf formats according to a format specifier and returns the resulting string.
Example ¶
package main
import (
"fmt"
"github.com/DoNewsCode/core/text"
)
func main() {
var printer text.BasePrinter
fmt.Println(printer.Sprintf("hello %s", "go"))
}
Output: hello go
Click to show internal directories.
Click to hide internal directories.