Codebase list golang-github-vbauerster-mpb / 3ae7e1f
typo fix: DidentRight to DindentRight Vladimir Bauer 2 years ago
3 changed file(s) with 12 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
77 )
88
99 const (
10 // DidentRight bit specifies identation direction.
10 // DindentRight sets indentation from right to left.
1111 //
12 // |foo |b | With DidentRight
13 // | foo| b| Without DidentRight
14 DidentRight = 1 << iota
12 // |foo |b | DindentRight is set
13 // | foo| b| DindentRight is not set
14 DindentRight = 1 << iota
1515
1616 // DextraSpace bit adds extra space, makes sense with DSyncWidth only.
17 // When DidentRight bit set, the space will be added to the right,
17 // When DindentRight bit set, the space will be added to the right,
1818 // otherwise to the left.
1919 DextraSpace
2020
2222 // Effective with multiple bars only.
2323 DSyncWidth
2424
25 // DSyncWidthR is shortcut for DSyncWidth|DidentRight
26 DSyncWidthR = DSyncWidth | DidentRight
25 // DSyncWidthR is shortcut for DSyncWidth|DindentRight
26 DSyncWidthR = DSyncWidth | DindentRight
2727
2828 // DSyncSpace is shortcut for DSyncWidth|DextraSpace
2929 DSyncSpace = DSyncWidth | DextraSpace
3030
31 // DSyncSpaceR is shortcut for DSyncWidth|DextraSpace|DidentRight
32 DSyncSpaceR = DSyncWidth | DextraSpace | DidentRight
31 // DSyncSpaceR is shortcut for DSyncWidth|DextraSpace|DindentRight
32 DSyncSpaceR = DSyncWidth | DextraSpace | DindentRight
3333 )
3434
3535 // TimeStyle enum.
155155
156156 // Init initializes width related config.
157157 func (wc *WC) Init() WC {
158 if (wc.C & DidentRight) != 0 {
158 if (wc.C & DindentRight) != 0 {
159159 wc.fill = runewidth.FillRight
160160 } else {
161161 wc.fill = runewidth.FillLeft
2424 want: " Test",
2525 },
2626 {
27 decorator: decor.Name("Test", decor.WC{W: 10, C: decor.DidentRight}),
27 decorator: decor.Name("Test", decor.WC{W: 10, C: decor.DindentRight}),
2828 want: "Test ",
2929 },
3030 }
2121 mpb.BarStyle().Lbound("╢").Filler("▌").Tip("▌").Padding("░").Rbound("╟"),
2222 mpb.PrependDecorators(
2323 // display our name with one space on the right
24 decor.Name(name, decor.WC{W: len(name) + 1, C: decor.DidentRight}),
24 decor.Name(name, decor.WC{W: len(name) + 1, C: decor.DindentRight}),
2525 // replace ETA decorator with "done" message, OnComplete event
2626 decor.OnComplete(
2727 decor.AverageETA(decor.ET_STYLE_GO, decor.WC{W: 4}), "done",