print.go 606 B

12345678910111213141516171819202122232425
  1. package terminal
  2. import (
  3. "fmt"
  4. )
  5. var (
  6. Stdout = NewAnsiStdout()
  7. )
  8. // Print prints given arguments with escape sequence conversion for windows.
  9. func Print(a ...interface{}) (n int, err error) {
  10. return fmt.Fprint(Stdout, a...)
  11. }
  12. // Printf prints a given format with escape sequence conversion for windows.
  13. func Printf(format string, a ...interface{}) (n int, err error) {
  14. return fmt.Fprintf(Stdout, format, a...)
  15. }
  16. // Println prints given arguments with newline and escape sequence conversion
  17. // for windows.
  18. func Println(a ...interface{}) (n int, err error) {
  19. return fmt.Fprintln(Stdout, a...)
  20. }