Codebase list golang-github-vbauerster-mpb / 04270f7
bar filler: struct defs on top Vladimir Bauer 2 years ago
1 changed file(s) with 10 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
3838 Reverse() BarStyleComposer
3939 }
4040
41 type component struct {
42 width int
43 bytes []byte
44 }
45
46 type flushSection struct {
47 meta func(io.Writer, ...interface{}) error
48 bytes []byte
49 }
50
4151 type bFiller struct {
4252 components [components]component
4353 meta [components]func(io.Writer, ...interface{}) error
4959 }
5060 }
5161
52 type component struct {
53 width int
54 bytes []byte
55 }
56
5762 type barStyle struct {
5863 style [components]string
5964 metaFuncs [components]func(io.Writer, ...interface{}) error
252257 return err
253258 }
254259 return s.meta[iRbound](w, s.components[iRbound].bytes)
255 }
256
257 type flushSection struct {
258 meta func(io.Writer, ...interface{}) error
259 bytes []byte
260260 }
261261
262262 func flush(w io.Writer, rev bool, sections ...flushSection) error {