TextPrinter contains methods to print formatted text to the console or return it as a string.
| 2 | |
| 3 | // TextPrinter contains methods to print formatted text to the console or return it as a string. |
| 4 | type TextPrinter interface { |
| 5 | // Sprint formats using the default formats for its operands and returns the resulting string. |
| 6 | // Spaces are added between operands when neither is a string. |
| 7 | Sprint(a ...any) string |
| 8 | |
| 9 | // Sprintln formats using the default formats for its operands and returns the resulting string. |
| 10 | // Spaces are always added between operands and a newline is appended. |
| 11 | Sprintln(a ...any) string |
| 12 | |
| 13 | // Sprintf formats according to a format specifier and returns the resulting string. |
| 14 | Sprintf(format string, a ...any) string |
| 15 | |
| 16 | // Sprintfln formats according to a format specifier and returns the resulting string. |
| 17 | // Spaces are always added between operands and a newline is appended. |
| 18 | Sprintfln(format string, a ...any) string |
| 19 | |
| 20 | // Print formats using the default formats for its operands and writes to standard output. |
| 21 | // Spaces are added between operands when neither is a string. |
| 22 | // It returns the number of bytes written and any write error encountered. |
| 23 | Print(a ...any) *TextPrinter |
| 24 | |
| 25 | // Println formats using the default formats for its operands and writes to standard output. |
| 26 | // Spaces are always added between operands and a newline is appended. |
| 27 | // It returns the number of bytes written and any write error encountered. |
| 28 | Println(a ...any) *TextPrinter |
| 29 | |
| 30 | // Printf formats according to a format specifier and writes to standard output. |
| 31 | // It returns the number of bytes written and any write error encountered. |
| 32 | Printf(format string, a ...any) *TextPrinter |
| 33 | |
| 34 | // Printfln formats according to a format specifier and writes to standard output. |
| 35 | // Spaces are always added between operands and a newline is appended. |
| 36 | // It returns the number of bytes written and any write error encountered. |
| 37 | Printfln(format string, a ...any) *TextPrinter |
| 38 | |
| 39 | // PrintOnError prints every error which is not nil. |
| 40 | // If every error is nil, nothing will be printed. |
| 41 | // This can be used for simple error checking. |
| 42 | PrintOnError(a ...any) *TextPrinter |
| 43 | |
| 44 | // PrintOnErrorf wraps every error which is not nil and prints it. |
| 45 | // If every error is nil, nothing will be printed. |
| 46 | // This can be used for simple error checking. |
| 47 | PrintOnErrorf(format string, a ...any) *TextPrinter |
| 48 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…