Skip to content

Commit

Permalink
update comments wording
Browse files Browse the repository at this point in the history
  • Loading branch information
wei840222 committed Jul 31, 2021
1 parent b4caf0f commit 9cbbe83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions context.go
Expand Up @@ -1160,23 +1160,23 @@ func (c *Context) SetAccepted(formats ...string) {
/***** GOLANG.ORG/X/NET/CONTEXT *****/
/************************************/

// Deadline returns that there is no deadline (ok==false) when c.Request with no Context.
// Deadline returns that there is no deadline (ok==false) when c.Request has no Context.
func (c *Context) Deadline() (deadline time.Time, ok bool) {
if c.Request == nil || c.Request.Context() == nil {
return
}
return c.Request.Context().Deadline()
}

// Done returns nil (chan which will wait forever) when c.Request with no Context.
// Done returns nil (chan which will wait forever) when c.Request has no Context.
func (c *Context) Done() <-chan struct{} {
if c.Request == nil || c.Request.Context() == nil {
return nil
}
return c.Request.Context().Done()
}

// Err returns nil when c.Request with no Context.
// Err returns nil when c.Request has no Context.
func (c *Context) Err() error {
if c.Request == nil || c.Request.Context() == nil {
return nil
Expand Down

0 comments on commit 9cbbe83

Please sign in to comment.