Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug = func(format string, args ...any) {}
View Source
var Error = func(err error, args ...any) { if err != nil { argString := "" for _, arg := range args { argString += fmt.Sprintf(" %v", arg) } Info("%v%s", err, argString) } }
Error logs any non-nil error passed
View Source
var Info = func(format string, args ...any) { if len(args) == 0 { _, _ = os.Stderr.WriteString(Prefix + template.Render(format) + "\n") } else { _, _ = fmt.Fprintf(os.Stderr, Prefix+template.Render(format)+"\n", args...) } }
View Source
var Prefix = ""
View Source
var Trace = func(format string, args ...any) {}
Functions ¶
func FormatJSON ¶ added in v0.1.0
FormatJSON pretty-prints the provided JSON string, returning the original string if an error occurs
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.