update input/outpu
This commit is contained in:
17
output/verbosity.go
Normal file
17
output/verbosity.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package output
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitoa.ru/go-4devs/console/output/verbosity"
|
||||
)
|
||||
|
||||
func Verbosity(out Output, verb verbosity.Verbosity) Output {
|
||||
return func(ctx context.Context, v verbosity.Verbosity, msg string, kv ...KeyValue) (int, error) {
|
||||
if verb >= v {
|
||||
return out(ctx, v, msg, kv...)
|
||||
}
|
||||
|
||||
return 0, nil
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user