Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Commit

Permalink
fix potential nil context in REST requests
Browse files Browse the repository at this point in the history
  • Loading branch information
andersfylling committed Oct 26, 2020
1 parent 3626fb6 commit ed1f209
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ func (b *RESTBuilder) prepare() {
if flags.Ignorecache() {
b.IgnoreCache()
}
if b.config.Ctx == nil {
b.config.Ctx = context.Background()
}
}

// execute ... v must be a nil pointer.
Expand Down

0 comments on commit ed1f209

Please sign in to comment.