func Printf(format string, args ...interface{}) error {
	var o options
	opts, args := extractOptions(args)
	o.apply(opts)
	if o.value != "" && o.valid() {
		return nil
	}
	text := fmt.Sprintf(format, args...)
	t, err := template.New("Printf").Funcs(promptui.FuncMap).Parse(text)
	if err != nil {
		return errors.Wrap(err, "error parsing template")
	}
	if err := t.Execute(os.Stderr, nil); err != nil {
		return errors.Wrap(err, "error executing template")
	}
	return nil
}
Printf uses templates to print the string formated to os.Stderr.
package ui
import (
	"fmt"
	"os"
	"strings"
	"text/template"
	"github.com/chzyer/readline"
	"github.com/manifoldco/promptui"
	"github.com/pkg/errors"
	"github.com/smallstep/cli/crypto/randutil"
)
type stderr struct{}
func (s *stderr) Write(b []byte) (int, error) {
	if len(b) == 1 && b[0] == readline.CharBell {
		return 0, nil
	}
	return os.Stderr.Write(b)
}
func (s *stderr) Close() error {
	return os.Stderr.Close()
}
func init() {
	readline.Stdout = &stderr{}
}
func Print(args ...interface{}) error {
	var o options
	opts, args := extractOptions(args)
	o.apply(opts)
	if o.value != "" && o.valid() {
		return nil
	}
	text := fmt.Sprint(args...)
	t, err := template.New("Print").Funcs(promptui.FuncMap).Parse(text)
	if err != nil {
		return errors.Wrap(err, "error parsing template")
	}
	if err := t.Execute(os.Stderr, nil); err != nil {
		return errors.Wrap(err, "error executing template")
	}
	return nil
}