diff --git a/README.md b/README.md index 45f90af..4b02f56 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,6 @@ func main() { ## Index - [Variables](<#variables>) -- [func Sprint\(a ...any\) string](<#Sprint>) - [type ANSI256Color](<#ANSI256Color>) - [func \(c ANSI256Color\) Sequence\(background bool\) string](<#ANSI256Color.Sequence>) - [func \(c ANSI256Color\) String\(\) string](<#ANSI256Color.String>) @@ -126,8 +125,17 @@ func main() { - [func \(c RGBColor\) Sequence\(background bool\) string](<#RGBColor.Sequence>) - [type Style](<#Style>) - [func NewStyle\(foregroundColor, backgroundColor Color, modifiers ...Modifier\) Style](<#NewStyle>) + - [func \(s Style\) Fprint\(w io.Writer, a ...any\) \(n int, err error\)](<#Style.Fprint>) + - [func \(s Style\) Fprintf\(w io.Writer, format string, a ...any\) \(n int, err error\)](<#Style.Fprintf>) + - [func \(s Style\) Fprintfln\(w io.Writer, format string, a ...any\) \(n int, err error\)](<#Style.Fprintfln>) + - [func \(s Style\) Fprintln\(w io.Writer, a ...any\) \(n int, err error\)](<#Style.Fprintln>) + - [func \(s Style\) Print\(a ...any\)](<#Style.Print>) + - [func \(s Style\) Printf\(format string, a ...any\)](<#Style.Printf>) + - [func \(s Style\) Printfln\(format string, a ...any\)](<#Style.Printfln>) + - [func \(s Style\) Println\(a ...any\)](<#Style.Println>) - [func \(s Style\) Sequence\(\) string](<#Style.Sequence>) - [func \(s Style\) Sprint\(a ...any\) string](<#Style.Sprint>) + - [func \(s Style\) Sprintf\(format string, a ...any\) string](<#Style.Sprintf>) ## Variables @@ -170,15 +178,12 @@ var ( ) ``` - -## func [Sprint]() + ```go -func Sprint(a ...any) string +var Writer io.Writer = os.Stdout ``` - - ## type [ANSI256Color]() @@ -248,7 +253,7 @@ func (c ANSIColor) Sequence(background bool) string -## type [Color]() +## type [Color]() @@ -371,7 +376,7 @@ func (c RGBColor) Sequence(background bool) string -## type [Style]() +## type [Style]() @@ -385,7 +390,7 @@ type Style struct { ``` -### func [NewStyle]() +### func [NewStyle]() ```go func NewStyle(foregroundColor, backgroundColor Color, modifiers ...Modifier) Style @@ -393,8 +398,80 @@ func NewStyle(foregroundColor, backgroundColor Color, modifiers ...Modifier) Sty + +### func \(Style\) [Fprint]() + +```go +func (s Style) Fprint(w io.Writer, a ...any) (n int, err error) +``` + +Fprint formats using the default formats for its operands and writes to w. + + +### func \(Style\) [Fprintf]() + +```go +func (s Style) Fprintf(w io.Writer, format string, a ...any) (n int, err error) +``` + +Fprintf formats according to a format specifier and writes to w. + + +### func \(Style\) [Fprintfln]() + +```go +func (s Style) Fprintfln(w io.Writer, format string, a ...any) (n int, err error) +``` + +Fprintfln formats according to a format specifier and writes to w. + + +### func \(Style\) [Fprintln]() + +```go +func (s Style) Fprintln(w io.Writer, a ...any) (n int, err error) +``` + +Fprintln formats using the default formats for its operands and writes to w. + + +### func \(Style\) [Print]() + +```go +func (s Style) Print(a ...any) +``` + +Print formats using the default formats for its operands and writes to standard output. + + +### func \(Style\) [Printf]() + +```go +func (s Style) Printf(format string, a ...any) +``` + +Printf formats according to a format specifier and writes to standard output. + + +### func \(Style\) [Printfln]() + +```go +func (s Style) Printfln(format string, a ...any) +``` + +Printfln formats according to a format specifier and writes to standard output. + + +### func \(Style\) [Println]() + +```go +func (s Style) Println(a ...any) +``` + +Println formats using the default formats for its operands and writes to standard output. + -### func \(Style\) [Sequence]() +### func \(Style\) [Sequence]() ```go func (s Style) Sequence() string @@ -403,13 +480,22 @@ func (s Style) Sequence() string -### func \(Style\) [Sprint]() +### func \(Style\) [Sprint]() ```go func (s Style) Sprint(a ...any) string ``` +Sprint formats using the default formats for its operands and returns the resulting string. + + +### func \(Style\) [Sprintf]() + +```go +func (s Style) Sprintf(format string, a ...any) string +``` +Sprintf formats according to a format specifier and returns the resulting string. Generated by [gomarkdoc]()