diff options
Diffstat (limited to 'vendor/github.com/vbauerster/mpb/v5/internal')
-rw-r--r-- | vendor/github.com/vbauerster/mpb/v5/internal/width.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vendor/github.com/vbauerster/mpb/v5/internal/width.go b/vendor/github.com/vbauerster/mpb/v5/internal/width.go new file mode 100644 index 000000000..35d528983 --- /dev/null +++ b/vendor/github.com/vbauerster/mpb/v5/internal/width.go @@ -0,0 +1,8 @@ +package internal + +func WidthForBarFiller(reqWidth, available int) int { + if reqWidth <= 0 || reqWidth >= available { + return available + } + return reqWidth +} |