Skip to content

Commit 14a087f

Browse files
- Linter fixes.
1 parent 06dbb1e commit 14a087f

File tree

6 files changed

+37
-34
lines changed

6 files changed

+37
-34
lines changed

internal/stackql/execution/mono_valent_execution.go

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ type monoValentExecution struct {
7979
isSkipResponse bool
8080
isMutation bool
8181
isAwait bool
82-
defaultHttpClient *http.Client // for testing purposes only
82+
defaultHTTPClient *http.Client // for testing purposes only
8383
}
8484

8585
func NewMonoValentExecutorFactory(
@@ -101,11 +101,11 @@ func NewMonoValentExecutorFactory(
101101
if stream == nil {
102102
stream = streaming.NewNopMapStream()
103103
}
104-
var defaultHttpClient *http.Client
104+
var defaultHTTPClient *http.Client
105105
if tableMeta != nil {
106106
prov, provErr := tableMeta.GetProvider()
107107
if provErr == nil && prov != nil {
108-
defaultHttpClient = prov.GetDefaultHttpClient()
108+
defaultHTTPClient = prov.GetDefaultHTTPClient()
109109
}
110110
}
111111
return &monoValentExecution{
@@ -121,7 +121,7 @@ func NewMonoValentExecutorFactory(
121121
isSkipResponse: isSkipResponse,
122122
isMutation: isMutation,
123123
isAwait: isAwait,
124-
defaultHttpClient: defaultHttpClient,
124+
defaultHTTPClient: defaultHTTPClient,
125125
}
126126
}
127127

@@ -423,7 +423,7 @@ func page(
423423
rtCtx dto.RuntimeCtx,
424424
authCtx *dto.AuthCtx,
425425
outErrFile io.Writer,
426-
defaultHttpClient *http.Client,
426+
defaultHTTPClient *http.Client,
427427
) PagingState {
428428
npt := inferNextPageResponseElement(provider, method)
429429
nptRequest := inferNextPageRequestElement(provider, method)
@@ -439,7 +439,7 @@ func page(
439439
if reqErr != nil {
440440
return newPagingState(pageCount, true, nil, reqErr)
441441
}
442-
cc := anysdk.NewAnySdkClientConfigurator(rtCtx, provider.GetName(), defaultHttpClient)
442+
cc := anysdk.NewAnySdkClientConfigurator(rtCtx, provider.GetName(), defaultHTTPClient)
443443
response, apiErr := anysdk.CallFromSignature(
444444
cc, rtCtx, authCtx, authCtx.Type, false, outErrFile, provider,
445445
anysdk.NewAnySdkOpStoreDesignation(method),
@@ -600,7 +600,7 @@ type AgnosticatePayload interface {
600600
IsSkipResponse() bool
601601
IsMutation() bool
602602
IsAwait() bool
603-
GetDefaultHttpClient() *http.Client // testing purposes only
603+
GetDefaultHTTPClient() *http.Client // testing purposes only
604604
}
605605

606606
type httpAgnosticatePayload struct {
@@ -620,7 +620,7 @@ type httpAgnosticatePayload struct {
620620
isSkipResponse bool
621621
isMutation bool
622622
isAwait bool
623-
defaultHttpClient *http.Client // testing purposes only
623+
defaultHTTPClient *http.Client // testing purposes only
624624
}
625625

626626
func newHTTPAgnosticatePayload(
@@ -640,7 +640,7 @@ func newHTTPAgnosticatePayload(
640640
isSkipResponse bool,
641641
isMutation bool,
642642
isAwait bool,
643-
defaultHttpClient *http.Client,
643+
defaultHTTPClient *http.Client,
644644
) AgnosticatePayload {
645645
return &httpAgnosticatePayload{
646646
tableMeta: tableMeta,
@@ -659,16 +659,16 @@ func newHTTPAgnosticatePayload(
659659
isSkipResponse: isSkipResponse,
660660
isMutation: isMutation,
661661
isAwait: isAwait,
662-
defaultHttpClient: defaultHttpClient,
662+
defaultHTTPClient: defaultHTTPClient,
663663
}
664664
}
665665

666666
func (ap *httpAgnosticatePayload) GetPolyHandler() PolyHandler {
667667
return ap.polyHandler
668668
}
669669

670-
func (ap *httpAgnosticatePayload) GetDefaultHttpClient() *http.Client {
671-
return ap.defaultHttpClient
670+
func (ap *httpAgnosticatePayload) GetDefaultHTTPClient() *http.Client {
671+
return ap.defaultHTTPClient
672672
}
673673

674674
func (ap *httpAgnosticatePayload) IsAwait() bool {
@@ -778,7 +778,7 @@ func agnosticate(
778778
isSkipResponse := agPayload.IsNilResponseAcceptable()
779779
isMutation := agPayload.IsMutation()
780780
isAwait := agPayload.IsAwait()
781-
defaultHttpClient := agPayload.GetDefaultHttpClient()
781+
defaultHTTPClient := agPayload.GetDefaultHTTPClient()
782782
// TODO: TCC setup
783783
armoury, armouryErr := agPayload.GetArmoury()
784784
if armouryErr != nil {
@@ -832,7 +832,7 @@ func agnosticate(
832832
false,
833833
isMutation,
834834
"",
835-
defaultHttpClient,
835+
defaultHTTPClient,
836836
),
837837
)
838838
processorResponse = processor.Process()
@@ -861,7 +861,7 @@ type ProcessorPayload interface {
861861
IsAwait() bool
862862
IsReverseRequired() bool
863863
GetVerb() string
864-
GetDefaultHttpClient() *http.Client // testing purposes only
864+
GetDefaultHTTPClient() *http.Client // testing purposes only
865865
}
866866

867867
func NewProcessorPayload(
@@ -882,7 +882,7 @@ func NewProcessorPayload(
882882
isReverseRequired bool,
883883
isMutation bool,
884884
verb string,
885-
defaultHttpClient *http.Client,
885+
defaultHTTPClient *http.Client,
886886
) ProcessorPayload {
887887
return &standardProcessorPayload{
888888
armouryParams: armouryParams,
@@ -902,7 +902,7 @@ func NewProcessorPayload(
902902
isReverseRequired: isReverseRequired,
903903
isMutation: isMutation,
904904
verb: verb,
905-
defaultHttpClient: defaultHttpClient,
905+
defaultHTTPClient: defaultHTTPClient,
906906
}
907907
}
908908

@@ -924,7 +924,7 @@ type standardProcessorPayload struct {
924924
isReverseRequired bool
925925
isMutation bool
926926
verb string
927-
defaultHttpClient *http.Client // testing purposes only
927+
defaultHTTPClient *http.Client // testing purposes only
928928
}
929929

930930
func (pp *standardProcessorPayload) GetArmouryParams() anysdk.HTTPArmouryParameters {
@@ -935,8 +935,8 @@ func (pp *standardProcessorPayload) IsSkipResponse() bool {
935935
return pp.isSkipResponse
936936
}
937937

938-
func (pp *standardProcessorPayload) GetDefaultHttpClient() *http.Client {
939-
return pp.defaultHttpClient
938+
func (pp *standardProcessorPayload) GetDefaultHTTPClient() *http.Client {
939+
return pp.defaultHTTPClient
940940
}
941941

942942
func (pp *standardProcessorPayload) IsAwait() bool {
@@ -1076,7 +1076,7 @@ type Processor interface {
10761076

10771077
type standardProcessor struct {
10781078
payload ProcessorPayload
1079-
defaultHttpClient *http.Client
1079+
defaultHTTPClient *http.Client
10801080
}
10811081

10821082
func NewProcessor(payload ProcessorPayload) Processor {
@@ -1119,7 +1119,7 @@ func (sp *standardProcessor) Process() ProcessorResponse {
11191119
return newHTTPProcessorResponse(nil, reversalStream, false, nil)
11201120
}
11211121
// TODO: fix cloning ops
1122-
cc := anysdk.NewAnySdkClientConfigurator(runtimeCtx, provider.GetName(), sp.defaultHttpClient)
1122+
cc := anysdk.NewAnySdkClientConfigurator(runtimeCtx, provider.GetName(), sp.defaultHTTPClient)
11231123
response, apiErr := anysdk.CallFromSignature(
11241124
cc,
11251125
runtimeCtx,
@@ -1253,7 +1253,7 @@ func (sp *standardProcessor) Process() ProcessorResponse {
12531253
runtimeCtx,
12541254
authCtx,
12551255
outErrFile,
1256-
sp.defaultHttpClient,
1256+
sp.defaultHTTPClient,
12571257
)
12581258
httpResponse, httpResponseErr = pageResult.GetHTTPResponse()
12591259
// if httpResponse != nil && httpResponse.Body != nil {
@@ -1447,7 +1447,7 @@ func (mv *monoValentExecution) GetExecutor() (func(pc primitive.IPrimitiveCtx) i
14471447
mv.isSkipResponse,
14481448
mv.isMutation,
14491449
mv.isAwait,
1450-
mv.defaultHttpClient,
1450+
mv.defaultHTTPClient,
14511451
)
14521452
processorResponse, agnosticErr := agnosticate(agnosticatePayload)
14531453
if agnosticErr != nil {

internal/stackql/primitivebuilder/exec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func (ss *Exec) Build() error {
149149
false,
150150
!ss.isShowResults,
151151
"",
152-
prov.GetDefaultHttpClient(), // for testing purposes only
152+
prov.GetDefaultHTTPClient(), // for testing purposes only
153153
)
154154
processor := execution.NewProcessor(pp)
155155
processorResponse := processor.Process()

internal/stackql/primitivebuilder/generic_http_reversal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ func (gh *genericHTTPReversal) Build() error {
166166
gh.isUndo,
167167
true,
168168
"undo",
169-
prov.GetDefaultHttpClient(), // for testing purposes only
169+
prov.GetDefaultHTTPClient(), // for testing purposes only
170170
)
171171
processor := execution.NewProcessor(pp)
172172
processorResponse := processor.Process()

internal/stackql/primitivebuilder/generic_http_stream_input.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ func (gh *genericHTTPStreamInput) Build() error {
315315
gh.isUndo,
316316
gh.isMutation,
317317
"",
318-
prov.GetDefaultHttpClient(), // for testing purposes only
318+
prov.GetDefaultHTTPClient(), // for testing purposes only
319319
)
320320
processor := execution.NewProcessor(pp)
321321
processorResponse := processor.Process()

internal/stackql/provider/generic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func (gp *GenericProvider) GetMethodForAction(
154154
return gp.methodSelector.GetMethodForAction(rsc, iqlAction, parameters)
155155
}
156156

157-
func (gp *GenericProvider) GetDefaultHttpClient() *http.Client {
157+
func (gp *GenericProvider) GetDefaultHTTPClient() *http.Client {
158158
return gp.defaultClient
159159
}
160160

internal/stackql/provider/provider.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type IProvider interface {
4040

4141
CheckCredentialFile(authCtx *dto.AuthCtx) error
4242

43-
GetDefaultHttpClient() *http.Client
43+
GetDefaultHTTPClient() *http.Client
4444

4545
EnhanceMetadataFilter(
4646
string,
@@ -108,18 +108,20 @@ type IProvider interface {
108108
ShowAuth(authCtx *dto.AuthCtx) (*anysdk.AuthMetadata, error)
109109
}
110110

111+
//nolint:revive // TODO: review
111112
func GenerateProvider(
112113
runtimeCtx dto.RuntimeCtx,
113114
providerStr,
114115
providerVersion string,
115116
reg anysdk.RegistryAPI,
116117
sqlSystem sql_system.SQLSystem,
117118
persistenceSystem sdk_persistence.PersistenceSystem,
118-
defaultHttpClient *http.Client,
119+
defaultHTTPClient *http.Client,
119120
) (IProvider, error) {
120121
switch providerStr { //nolint:gocritic // TODO: review
121122
default:
122-
return newGenericProvider(runtimeCtx, providerStr, providerVersion, reg, sqlSystem, persistenceSystem, defaultHttpClient)
123+
return newGenericProvider(
124+
runtimeCtx, providerStr, providerVersion, reg, sqlSystem, persistenceSystem, defaultHTTPClient)
123125
}
124126
}
125127

@@ -132,14 +134,15 @@ func getURL(prov string) (string, error) { //nolint:unparam // TODO: review
132134
}
133135
}
134136

137+
//nolint:revive // TODO: review
135138
func newGenericProvider(
136139
rtCtx dto.RuntimeCtx,
137140
providerStr,
138141
versionStr string,
139142
reg anysdk.RegistryAPI,
140143
_ sql_system.SQLSystem,
141144
persistenceSystem sdk_persistence.PersistenceSystem,
142-
defaultHttpClient *http.Client,
145+
defaultHTTPClient *http.Client,
143146
) (IProvider, error) {
144147
methSel, err := methodselect.NewMethodSelector(providerStr, versionStr)
145148
if err != nil {
@@ -176,8 +179,8 @@ func newGenericProvider(
176179
discoveryAdapter: da,
177180
apiVersion: versionStr,
178181
methodSelector: methSel,
179-
authUtil: auth_util.NewAuthUtility(defaultHttpClient),
180-
defaultClient: defaultHttpClient,
182+
authUtil: auth_util.NewAuthUtility(defaultHTTPClient),
183+
defaultClient: defaultHTTPClient,
181184
}
182185
return gp, err
183186
}

0 commit comments

Comments
 (0)