diff --git a/_examples/suppressBar/main.go b/_examples/suppressBar/main.go index f7d0c3e..b128349 100644 --- a/_examples/suppressBar/main.go +++ b/_examples/suppressBar/main.go @@ -81,8 +81,8 @@ base mpb.Filler } -// implementing mpb.BaseFiller, so bar.SetRefill works -func (cf *customFiller) BaseFiller() mpb.Filler { +// implementing mpb.WrapFiller, so bar.SetRefill works +func (cf *customFiller) Base() mpb.Filler { return cf.base } diff --git a/bar.go b/bar.go index c362da7..1828e67 100644 --- a/bar.go +++ b/bar.go @@ -29,11 +29,11 @@ f(w, width, stat) } -// Wrapper interface. +// WrapFiller interface. // If you're implementing custom Filler by wrapping a built-in one, // it is necessary to implement this interface to retain functionality // of built-in Filler. -type Wrapper interface { +type WrapFiller interface { Base() Filler } diff --git a/progress.go b/progress.go index 1d279fa..c9b72b0 100644 --- a/progress.go +++ b/progress.go @@ -389,7 +389,7 @@ } func extractBaseFiller(f Filler) Filler { - if f, ok := f.(Wrapper); ok { + if f, ok := f.(WrapFiller); ok { return extractBaseFiller(f.Base()) } return f