You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
544 B

package output
import (
"context"
"gitoa.ru/go-4devs/console/output/formatter"
4 years ago
"gitoa.ru/go-4devs/console/output/label"
"gitoa.ru/go-4devs/console/output/verbosity"
)
func Format(out Output, format *formatter.Formatter) Output {
4 years ago
return func(ctx context.Context, v verbosity.Verbosity, msg string, kv ...label.KeyValue) (int, error) {
return out(ctx, v, format.Format(ctx, msg), kv...)
}
}
func Ansi(out Output) Output {
return Format(out, formatter.Ansi())
}
func None(out Output) Output {
return Format(out, formatter.None())
}