From 032eec423e98be91eff95c10a536333605bde454 Mon Sep 17 00:00:00 2001 From: frrist Date: Fri, 26 Jan 2024 12:55:07 -0800 Subject: [PATCH] refactor: remove context from vlient BaseRequest the context is passed into each method --- pkg/publicapi/apimodels/base_requests.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkg/publicapi/apimodels/base_requests.go b/pkg/publicapi/apimodels/base_requests.go index 692f7e36d6..7410bd1503 100644 --- a/pkg/publicapi/apimodels/base_requests.go +++ b/pkg/publicapi/apimodels/base_requests.go @@ -1,7 +1,6 @@ package apimodels import ( - "context" "strconv" ) @@ -9,7 +8,6 @@ import ( type BaseRequest struct { Namespace string `query:"namespace"` Headers map[string]string `query:"-"` - Context context.Context `query:"-"` // A good place to define other fields that are common to all requests, // such as auth tokens @@ -22,9 +20,6 @@ func (o *BaseRequest) ToHTTPRequest() *HTTPRequest { if o.Namespace != "" { r.Params.Set("namespace", o.Namespace) } - if o.Context != nil { - r.Ctx = o.Context - } for k, v := range o.Headers { r.Header.Set(k, v)