-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add WithContext versions of functions that use contexts.
These new functions are equivalent, but allow callers to pass a context down from main (or equivalent). This is necessary to comply with certain style guides, for example, https://google.github.io/styleguide/go/decisions#contexts. We considered replacing dhcpv4.GenerateTransactionID with rand.Read(xid[:]) based on the godoc saying that Read call "never returns an error", but this package is used in embedded situations where it can fail. Signed-off-by: Mark Suter <[email protected]>
- Loading branch information
Showing
1 changed file
with
39 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters