func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { p := newPrinter() defer free(p) p.doPrintf(format, a) n, err = w.Write(p.buf) return }
func Errorf(format string, a ...interface{}) error { return fmt.Errorf(format, a...) }In this function, the `Errorf` method of the `fmt` package is called with a format string and variadic arguments. Within the `Errorf` method, `fmt.State` is used to format the output string. Therefore, the package library that provides implementation for `fmt.State` is the `fmt` package in Go.