1package decor
2
3// Any decorator displays text, that can be changed during decorator's
4// lifetime via provided DecorFunc.
5//
6//	`fn` DecorFunc callback
7//
8//	`wcc` optional WC config
9//
10func Any(fn DecorFunc, wcc ...WC) Decorator {
11	return &any{initWC(wcc...), fn}
12}
13
14type any struct {
15	WC
16	fn DecorFunc
17}
18
19func (d *any) Decor(s Statistics) string {
20	return d.FormatMsg(d.fn(s))
21}
22