From 1b7dadd7db9ba42952644ad5e9a49591d6a5191f Mon Sep 17 00:00:00 2001 From: Kyle Nusbaum Date: Wed, 18 Mar 2020 14:16:44 -0500 Subject: [PATCH] context: remove trailing period from panic messages --- src/context/context.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/context/context.go b/src/context/context.go index 7b9736165f229..b3fdb8277afc3 100644 --- a/src/context/context.go +++ b/src/context/context.go @@ -231,7 +231,7 @@ type CancelFunc func() // call cancel as soon as the operations running in this Context complete. func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { if parent == nil { - panic("cannot create context from nil parent.") + panic("cannot create context from nil parent") } c := newCancelCtx(parent) propagateCancel(parent, &c) @@ -429,7 +429,7 @@ func (c *cancelCtx) cancel(removeFromParent bool, err error) { // call cancel as soon as the operations running in this Context complete. func WithDeadline(parent Context, d time.Time) (Context, CancelFunc) { if parent == nil { - panic("cannot create context from nil parent.") + panic("cannot create context from nil parent") } if cur, ok := parent.Deadline(); ok && cur.Before(d) { // The current deadline is already sooner than the new one. @@ -518,7 +518,7 @@ func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { // type should be a pointer or interface. func WithValue(parent Context, key, val interface{}) Context { if parent == nil { - panic("cannot create context from nil parent.") + panic("cannot create context from nil parent") } if key == nil { panic("nil key")