package
Version:
v0.7.1
Opens a new window with list of versions in this module.
Published: Apr 4, 2026
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Tprintf formats a string using a template
package main
import (
"fmt"
fmtx "github.com/foomo/go/fmt"
)
func main() {
format := "%{.name} is %{.age} years old"
fmt.Println(fmtx.Tprintf(format, "name", "John", "age", "30"))
}
Output:
John is 30 years old
Source Files
¶
Click to show internal directories.
Click to hide internal directories.