Codebase list golang-github-vbauerster-mpb / e17a2c2
NewWithContext: ctx nil check Vladimir Bauer 3 years ago
1 changed file(s) with 3 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
6363 // context. It's not possible to reuse instance after (*Progress).Wait
6464 // method has been called.
6565 func NewWithContext(ctx context.Context, options ...ContainerOption) *Progress {
66 if ctx == nil {
67 ctx = context.Background()
68 }
6669 ctx, cancel := context.WithCancel(ctx)
6770 s := &pState{
6871 ctx: ctx,