Apply goimports' modifications

This commit is contained in:
Jihoon Seo
2021-01-28 13:42:03 +09:00
parent 2bb6c45786
commit 113b90531c
34 changed files with 57 additions and 67 deletions

View File

@@ -44,7 +44,7 @@ func StartMock() Stub {
return mockFilter
}
func CtxWithMock(ctx context.Context, mock... *Mock) context.Context {
func CtxWithMock(ctx context.Context, mock ...*Mock) context.Context {
return context.WithValue(ctx, mockCtxKey, mock)
}
@@ -73,8 +73,6 @@ func NewMock(con RequestCondition, resp *http.Response, err error) *Mock {
return &Mock{
cond: con,
resp: resp,
err: err,
err: err,
}
}

View File

@@ -120,7 +120,6 @@ func (sc *SimpleCondition) matchBodyFields(ctx context.Context, req *httplib.Bee
return false
}
m := make(map[string]interface{})
err = json.Unmarshal(bytes, &m)

View File

@@ -72,6 +72,6 @@ func OriginnalCodeUsingHttplibPassCtx(ctx context.Context) (*http.Response, erro
return httplib.Get("http://localhost:7777/abc").DoRequestWithCtx(ctx)
}
func OriginalCodeUsingHttplib() (*http.Response, error){
func OriginalCodeUsingHttplib() (*http.Response, error) {
return httplib.Get("http://localhost:7777/abc").DoRequest()
}