mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-16 21:32:11 +08:00
update comments wording
This commit is contained in:
parent
b4caf0fd41
commit
9cbbe8328f
@ -1160,7 +1160,7 @@ func (c *Context) SetAccepted(formats ...string) {
|
|||||||
/***** GOLANG.ORG/X/NET/CONTEXT *****/
|
/***** 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) {
|
func (c *Context) Deadline() (deadline time.Time, ok bool) {
|
||||||
if c.Request == nil || c.Request.Context() == nil {
|
if c.Request == nil || c.Request.Context() == nil {
|
||||||
return
|
return
|
||||||
@ -1168,7 +1168,7 @@ func (c *Context) Deadline() (deadline time.Time, ok bool) {
|
|||||||
return c.Request.Context().Deadline()
|
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{} {
|
func (c *Context) Done() <-chan struct{} {
|
||||||
if c.Request == nil || c.Request.Context() == nil {
|
if c.Request == nil || c.Request.Context() == nil {
|
||||||
return nil
|
return nil
|
||||||
@ -1176,7 +1176,7 @@ func (c *Context) Done() <-chan struct{} {
|
|||||||
return c.Request.Context().Done()
|
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 {
|
func (c *Context) Err() error {
|
||||||
if c.Request == nil || c.Request.Context() == nil {
|
if c.Request == nil || c.Request.Context() == nil {
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user