fmt

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tprintf

func Tprintf(format string, pairs ...string) string

Tprintf formats a string using a template

Example
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

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL