@@ -83,7 +83,7 @@ func (c *Ctx) RequestStart(w http.ResponseWriter, r *http.Request) {
8383// golang.org/x/net/context contained on this Context.
8484// It is a shortcut for context.WithValue(..., ...)
8585func (c * Ctx ) Set (key interface {}, value interface {}) {
86- * c .request = * c .request .WithContext (context .WithValue (c .request .Context (), key , value )) // temporarily shallow copying to avoid problems with external libraries
86+ c .request = c .request .WithContext (context .WithValue (c .request .Context (), key , value )) // temporarily shallow copying to avoid problems with external libraries
8787}
8888
8989// Get returns the value for the given key and is a shortcut
@@ -108,7 +108,7 @@ func (c *Ctx) Context() context.Context {
108108// WithContext updates the underlying request's context with to ctx
109109// The provided ctx must be non-nil.
110110func (c * Ctx ) WithContext (ctx context.Context ) {
111- * c .request = * c .request .WithContext (ctx ) // temporarily shallow copying to avoid problems with external libraries
111+ c .request = c .request .WithContext (ctx ) // temporarily shallow copying to avoid problems with external libraries
112112}
113113
114114// Deadline calls the underlying golang.org/x/net/context Deadline()
@@ -135,29 +135,29 @@ func (c *Ctx) Value(key interface{}) interface{} {
135135// updates context on the containing las.Context object.
136136func (c * Ctx ) WithCancel () context.CancelFunc {
137137 ctx , cf := context .WithCancel (c .request .Context ())
138- * c .request = * c .request .WithContext (ctx ) // temporarily shallow copying to avoid problems with external libraries
138+ c .request = c .request .WithContext (ctx ) // temporarily shallow copying to avoid problems with external libraries
139139 return cf
140140}
141141
142142// WithDeadline calls golang.org/x/net/context WithDeadline and automatically
143143// updates context on the containing las.Context object.
144144func (c * Ctx ) WithDeadline (deadline time.Time ) context.CancelFunc {
145145 ctx , cf := context .WithDeadline (c .request .Context (), deadline )
146- * c .request = * c .request .WithContext (ctx ) // temporarily shallow copying to avoid problems with external libraries
146+ c .request = c .request .WithContext (ctx ) // temporarily shallow copying to avoid problems with external libraries
147147 return cf
148148}
149149
150150// WithTimeout calls golang.org/x/net/context WithTimeout and automatically
151151// updates context on the containing las.Context object.
152152func (c * Ctx ) WithTimeout (timeout time.Duration ) context.CancelFunc {
153153 ctx , cf := context .WithTimeout (c .request .Context (), timeout )
154- * c .request = * c .request .WithContext (ctx ) // temporarily shallow copying to avoid problems with external libraries
154+ c .request = c .request .WithContext (ctx ) // temporarily shallow copying to avoid problems with external libraries
155155 return cf
156156}
157157
158158// WithValue calls golang.org/x/net/context WithValue and automatically
159159// updates context on the containing las.Context object.
160160// Can also use Set() function on Context object (Recommended)
161161func (c * Ctx ) WithValue (key interface {}, val interface {}) {
162- * c .request = * c .request .WithContext (context .WithValue (c .request .Context (), key , val )) // temporarily shallow copying to avoid problems with external libraries
162+ c .request = c .request .WithContext (context .WithValue (c .request .Context (), key , val )) // temporarily shallow copying to avoid problems with external libraries
163163}
0 commit comments