mirror of
https://github.com/mum4k/termdash.git
synced 2025-04-25 13:48:50 +08:00
updated pull-request
This commit is contained in:
parent
0c05aeed5f
commit
a4152652fc
@ -107,8 +107,7 @@ func TestPullBlocksUntilAvailable(t *testing.T) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Millisecond)
|
||||
defer cancel()
|
||||
|
||||
_, err := q.Pull(ctx)
|
||||
if err == nil {
|
||||
if _, err := q.Pull(ctx); err != nil {
|
||||
t.Fatal("Pull => expected timeout error, got nil")
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,10 @@ func rowLabel(scale *YScale, y int, labelWidth int) (*Label, error) {
|
||||
}
|
||||
|
||||
ar := rowLabelArea(y, labelWidth)
|
||||
pos, _ := align.Text(ar, v.Text(), align.HorizontalRight, align.VerticalMiddle)
|
||||
pos, err := align.Text(ar, v.Text(), align.HorizontalRight, align.VerticalMiddle)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to align the label value: %v", err)
|
||||
}
|
||||
return &Label{
|
||||
Value: v,
|
||||
Pos: pos,
|
||||
|
Loading…
x
Reference in New Issue
Block a user