Check if opt is nil
Vladimir Bauer
8 years ago
2 changed file(s) with
6 addition(s)
and
2 deletion(s)
.
Raw diff
Collapse all
Expand all
+3
-1
bar.go
less
more
93
93
}
94
94
95
95
for _, opt := range options {
96
opt(s)
96
if opt != nil {
97
opt(s)
98
}
97
99
}
98
100
99
101
s.bufP = bytes.NewBuffer(make([]byte, 0, s.width/2))
+3
-1
progress.go
less
more
68
68
}
69
69
70
70
for _, opt := range options {
71
opt(s)
71
if opt != nil {
72
opt(s)
73
}
72
74
}
73
75
74
76
p := &Progress{