Files
uberbringer/vendor/github.com/liamg/tml/printf.go
William Gill 03a47deade
Some checks failed
Create Release & Upload Assets / Upload Assets To Gitea w/ goreleaser (push) Failing after 11s
Create new type and remove un-used code
2025-01-12 19:33:57 -06:00

23 lines
554 B
Go

package tml
import (
"fmt"
"io"
"os"
)
// Printf works like fmt.Printf, but adds the option of using tags to apply colour or text formatting to the written text. For example "<red>some red text</red>".
// A full list of tags is available here: https://github.com/liamg/tml
func Printf(input string, a ...interface{}) error {
return Fprintf(os.Stdout, input, a...)
}
func Fprintf(w io.Writer, input string, a ...interface{}) error {
format, err := Parse(input)
if err != nil {
return err
}
_, err = fmt.Fprintf(w, format, a...)
return err
}