Skip to content

Commit d3ed4d1

Browse files
authored
Merge pull request #2374 from akshat-kumar-singhal/linter-fixes
2 parents bee168f + 837ea7f commit d3ed4d1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+163
-54
lines changed

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ linters:
4444
- usestdlibvars
4545
- usetesting
4646
- whitespace
47-
- wsl
47+
- wsl_v5
4848

4949
# don't enable:
5050
# - godox # Disabling because we need TODO lines at this stage of project.

pkg/gofr/cmd/terminal/printers_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010

1111
func TestOutput_Printf(t *testing.T) {
1212
var buf bytes.Buffer
13+
1314
output := Out{out: &buf}
1415

1516
format := "Hello, %s!"
@@ -22,6 +23,7 @@ func TestOutput_Printf(t *testing.T) {
2223

2324
func TestOutput_Print(t *testing.T) {
2425
var buf bytes.Buffer
26+
2527
output := Out{out: &buf}
2628

2729
message := "Hello, world!"
@@ -32,6 +34,7 @@ func TestOutput_Print(t *testing.T) {
3234

3335
func TestOutput_Println(t *testing.T) {
3436
var buf bytes.Buffer
37+
3538
output := Out{out: &buf}
3639

3740
message := "Hello, world!"

pkg/gofr/cmd/terminal/progress_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ func TestProgressBar_SuccessCases(t *testing.T) {
1313
total := int64(100)
1414

1515
var out bytes.Buffer
16+
1617
stream := &Out{terminal{isTerminal: true, fd: 1}, &out}
1718
bar := ProgressBar{
1819
stream: stream,
@@ -42,6 +43,7 @@ func TestProgressBar_SuccessCases(t *testing.T) {
4243

4344
func TestProgressBar_Fail(t *testing.T) {
4445
var out bytes.Buffer
46+
4547
stream := &Out{terminal{isTerminal: true, fd: 1}, &out}
4648
bar, err := NewProgressBar(stream, int64(-1))
4749

@@ -52,6 +54,7 @@ func TestProgressBar_Fail(t *testing.T) {
5254

5355
func TestProgressBar_Incr(t *testing.T) {
5456
var out bytes.Buffer
57+
5558
stream := &Out{terminal{isTerminal: true, fd: 1}, &out}
5659
bar := ProgressBar{stream: stream, current: 0, total: 100, mu: sync.Mutex{}}
5760
// doing this as while calculating terminal size, the code will not

pkg/gofr/context_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ func TestContext_WriteMessageToSocket(t *testing.T) {
101101

102102
// Start server in goroutine
103103
serverDone := make(chan struct{})
104+
104105
go func() {
105106
defer close(serverDone)
107+
106108
app.Run()
107109
}()
108110

@@ -222,8 +224,10 @@ func TestContext_WriteMessageToService(t *testing.T) {
222224

223225
// Start server in goroutine
224226
serverDone := make(chan struct{})
227+
225228
go func() {
226229
defer close(serverDone)
230+
227231
app.Run()
228232
}()
229233

pkg/gofr/cron.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ func (j *job) run(cntnr *container.Container) {
102102
c.Infof("Starting cron job: %s", j.name)
103103

104104
start := time.Now()
105+
105106
defer func() {
106107
if r := recover(); r != nil {
107108
c.Errorf("Panic in cron job %s: %v", j.name, r)

pkg/gofr/datasource/arangodb/arango.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ func (c *Client) Query(ctx context.Context, dbName, query string, bindVars map[s
254254
queryOptions.BindVars = bindVars
255255

256256
cursor, err := db.Query(tracerCtx, query, &queryOptions)
257-
258257
if err != nil {
259258
return err
260259
}
@@ -340,6 +339,7 @@ func (c *Client) sendOperationStats(ql *QueryLog, startTime time.Time, method st
340339

341340
if span != nil {
342341
defer span.End()
342+
343343
span.SetAttributes(attribute.Int64(fmt.Sprintf("arangodb.%v.duration", method), duration))
344344
}
345345
}

pkg/gofr/datasource/arangodb/mock_graph.go

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ func (m *MockDatabaseGraph) CreateGraph(ctx context.Context, name string, graph
6363
// CreateGraph indicates an expected call of CreateGraph.
6464
func (mr *MockDatabaseGraphMockRecorder) CreateGraph(ctx, name, graph, options any) *gomock.Call {
6565
mr.mock.ctrl.T.Helper()
66+
6667
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateGraph",
6768
reflect.TypeOf((*MockDatabaseGraph)(nil).CreateGraph), ctx, name, graph, options)
6869
}
@@ -81,6 +82,7 @@ func (m *MockDatabaseGraph) GetEdges(ctx context.Context, name, vertex string,
8182
// GetEdges indicates an expected call of GetEdges.
8283
func (mr *MockDatabaseGraphMockRecorder) GetEdges(ctx, name, vertex, options any) *gomock.Call {
8384
mr.mock.ctrl.T.Helper()
85+
8486
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEdges",
8587
reflect.TypeOf((*MockDatabaseGraph)(nil).GetEdges), ctx, name, vertex, options)
8688
}
@@ -99,6 +101,7 @@ func (m *MockDatabaseGraph) Graph(ctx context.Context, name string,
99101
// Graph indicates an expected call of Graph.
100102
func (mr *MockDatabaseGraphMockRecorder) Graph(ctx, name, options any) *gomock.Call {
101103
mr.mock.ctrl.T.Helper()
104+
102105
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Graph",
103106
reflect.TypeOf((*MockDatabaseGraph)(nil).Graph), ctx, name, options)
104107
}
@@ -116,6 +119,7 @@ func (m *MockDatabaseGraph) GraphExists(ctx context.Context, name string) (bool,
116119
// GraphExists indicates an expected call of GraphExists.
117120
func (mr *MockDatabaseGraphMockRecorder) GraphExists(ctx, name any) *gomock.Call {
118121
mr.mock.ctrl.T.Helper()
122+
119123
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GraphExists",
120124
reflect.TypeOf((*MockDatabaseGraph)(nil).GraphExists), ctx, name)
121125
}
@@ -133,6 +137,7 @@ func (m *MockDatabaseGraph) Graphs(ctx context.Context) (GraphsResponseReader, e
133137
// Graphs indicates an expected call of Graphs.
134138
func (mr *MockDatabaseGraphMockRecorder) Graphs(ctx any) *gomock.Call {
135139
mr.mock.ctrl.T.Helper()
140+
136141
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Graphs",
137142
reflect.TypeOf((*MockDatabaseGraph)(nil).Graphs), ctx)
138143
}
@@ -174,6 +179,7 @@ func (m *MockGraphsResponseReader) Read() (arangodb.Graph, error) {
174179
// Read indicates an expected call of Read.
175180
func (mr *MockGraphsResponseReaderMockRecorder) Read() *gomock.Call {
176181
mr.mock.ctrl.T.Helper()
182+
177183
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read",
178184
reflect.TypeOf((*MockGraphsResponseReader)(nil).Read))
179185
}
@@ -216,6 +222,7 @@ func (m *MockGraph) CreateEdgeDefinition(ctx context.Context, collection string,
216222
// CreateEdgeDefinition indicates an expected call of CreateEdgeDefinition.
217223
func (mr *MockGraphMockRecorder) CreateEdgeDefinition(ctx, collection, from, to, opts any) *gomock.Call {
218224
mr.mock.ctrl.T.Helper()
225+
219226
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateEdgeDefinition",
220227
reflect.TypeOf((*MockGraph)(nil).CreateEdgeDefinition), ctx, collection, from, to, opts)
221228
}
@@ -234,6 +241,7 @@ func (m *MockGraph) CreateVertexCollection(ctx context.Context, name string,
234241
// CreateVertexCollection indicates an expected call of CreateVertexCollection.
235242
func (mr *MockGraphMockRecorder) CreateVertexCollection(ctx, name, opts any) *gomock.Call {
236243
mr.mock.ctrl.T.Helper()
244+
237245
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVertexCollection",
238246
reflect.TypeOf((*MockGraph)(nil).CreateVertexCollection), ctx, name, opts)
239247
}
@@ -252,6 +260,7 @@ func (m *MockGraph) DeleteEdgeDefinition(ctx context.Context, collection string,
252260
// DeleteEdgeDefinition indicates an expected call of DeleteEdgeDefinition.
253261
func (mr *MockGraphMockRecorder) DeleteEdgeDefinition(ctx, collection, opts any) *gomock.Call {
254262
mr.mock.ctrl.T.Helper()
263+
255264
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteEdgeDefinition",
256265
reflect.TypeOf((*MockGraph)(nil).DeleteEdgeDefinition), ctx, collection, opts)
257266
}
@@ -270,6 +279,7 @@ func (m *MockGraph) DeleteVertexCollection(ctx context.Context, name string,
270279
// DeleteVertexCollection indicates an expected call of DeleteVertexCollection.
271280
func (mr *MockGraphMockRecorder) DeleteVertexCollection(ctx, name, opts any) *gomock.Call {
272281
mr.mock.ctrl.T.Helper()
282+
273283
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteVertexCollection",
274284
reflect.TypeOf((*MockGraph)(nil).DeleteVertexCollection), ctx, name, opts)
275285
}
@@ -287,6 +297,7 @@ func (m *MockGraph) EdgeDefinition(ctx context.Context, collection string) (aran
287297
// EdgeDefinition indicates an expected call of EdgeDefinition.
288298
func (mr *MockGraphMockRecorder) EdgeDefinition(ctx, collection any) *gomock.Call {
289299
mr.mock.ctrl.T.Helper()
300+
290301
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EdgeDefinition",
291302
reflect.TypeOf((*MockGraph)(nil).EdgeDefinition), ctx, collection)
292303
}
@@ -304,6 +315,7 @@ func (m *MockGraph) EdgeDefinitionExists(ctx context.Context, collection string)
304315
// EdgeDefinitionExists indicates an expected call of EdgeDefinitionExists.
305316
func (mr *MockGraphMockRecorder) EdgeDefinitionExists(ctx, collection any) *gomock.Call {
306317
mr.mock.ctrl.T.Helper()
318+
307319
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EdgeDefinitionExists",
308320
reflect.TypeOf((*MockGraph)(nil).EdgeDefinitionExists), ctx, collection)
309321
}
@@ -411,6 +423,7 @@ func (m *MockGraph) NumberOfShards() *int {
411423
// NumberOfShards indicates an expected call of NumberOfShards.
412424
func (mr *MockGraphMockRecorder) NumberOfShards() *gomock.Call {
413425
mr.mock.ctrl.T.Helper()
426+
414427
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NumberOfShards",
415428
reflect.TypeOf((*MockGraph)(nil).NumberOfShards))
416429
}
@@ -427,6 +440,7 @@ func (m *MockGraph) OrphanCollections() []string {
427440
// OrphanCollections indicates an expected call of OrphanCollections.
428441
func (mr *MockGraphMockRecorder) OrphanCollections() *gomock.Call {
429442
mr.mock.ctrl.T.Helper()
443+
430444
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OrphanCollections",
431445
reflect.TypeOf((*MockGraph)(nil).OrphanCollections))
432446
}
@@ -460,6 +474,7 @@ func (m *MockGraph) ReplaceEdgeDefinition(ctx context.Context, collection string
460474
// ReplaceEdgeDefinition indicates an expected call of ReplaceEdgeDefinition.
461475
func (mr *MockGraphMockRecorder) ReplaceEdgeDefinition(ctx, collection, from, to, opts any) *gomock.Call {
462476
mr.mock.ctrl.T.Helper()
477+
463478
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplaceEdgeDefinition",
464479
reflect.TypeOf((*MockGraph)(nil).ReplaceEdgeDefinition), ctx, collection, from, to, opts)
465480
}
@@ -476,6 +491,7 @@ func (m *MockGraph) ReplicationFactor() int {
476491
// ReplicationFactor indicates an expected call of ReplicationFactor.
477492
func (mr *MockGraphMockRecorder) ReplicationFactor() *gomock.Call {
478493
mr.mock.ctrl.T.Helper()
494+
479495
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplicationFactor",
480496
reflect.TypeOf((*MockGraph)(nil).ReplicationFactor))
481497
}
@@ -492,6 +508,7 @@ func (m *MockGraph) SmartGraphAttribute() string {
492508
// SmartGraphAttribute indicates an expected call of SmartGraphAttribute.
493509
func (mr *MockGraphMockRecorder) SmartGraphAttribute() *gomock.Call {
494510
mr.mock.ctrl.T.Helper()
511+
495512
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SmartGraphAttribute",
496513
reflect.TypeOf((*MockGraph)(nil).SmartGraphAttribute))
497514
}
@@ -509,6 +526,7 @@ func (m *MockGraph) VertexCollection(ctx context.Context, name string) (arangodb
509526
// VertexCollection indicates an expected call of VertexCollection.
510527
func (mr *MockGraphMockRecorder) VertexCollection(ctx, name any) *gomock.Call {
511528
mr.mock.ctrl.T.Helper()
529+
512530
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VertexCollection",
513531
reflect.TypeOf((*MockGraph)(nil).VertexCollection), ctx, name)
514532
}
@@ -526,6 +544,7 @@ func (m *MockGraph) VertexCollectionExists(ctx context.Context, name string) (bo
526544
// VertexCollectionExists indicates an expected call of VertexCollectionExists.
527545
func (mr *MockGraphMockRecorder) VertexCollectionExists(ctx, name any) *gomock.Call {
528546
mr.mock.ctrl.T.Helper()
547+
529548
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VertexCollectionExists",
530549
reflect.TypeOf((*MockGraph)(nil).VertexCollectionExists), ctx, name)
531550
}
@@ -543,6 +562,7 @@ func (m *MockGraph) VertexCollections(ctx context.Context) ([]arangodb.VertexCol
543562
// VertexCollections indicates an expected call of VertexCollections.
544563
func (mr *MockGraphMockRecorder) VertexCollections(ctx any) *gomock.Call {
545564
mr.mock.ctrl.T.Helper()
565+
546566
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VertexCollections",
547567
reflect.TypeOf((*MockGraph)(nil).VertexCollections), ctx)
548568
}
@@ -600,6 +620,7 @@ func (m *MockGraphVertexCollections) CreateVertexCollection(ctx context.Context,
600620
// CreateVertexCollection indicates an expected call of CreateVertexCollection.
601621
func (mr *MockGraphVertexCollectionsMockRecorder) CreateVertexCollection(ctx, name, opts any) *gomock.Call {
602622
mr.mock.ctrl.T.Helper()
623+
603624
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVertexCollection",
604625
reflect.TypeOf((*MockGraphVertexCollections)(nil).CreateVertexCollection), ctx, name, opts)
605626
}
@@ -618,6 +639,7 @@ func (m *MockGraphVertexCollections) DeleteVertexCollection(ctx context.Context,
618639
// DeleteVertexCollection indicates an expected call of DeleteVertexCollection.
619640
func (mr *MockGraphVertexCollectionsMockRecorder) DeleteVertexCollection(ctx, name, opts any) *gomock.Call {
620641
mr.mock.ctrl.T.Helper()
642+
621643
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock,
622644
"DeleteVertexCollection", reflect.TypeOf((*MockGraphVertexCollections)(nil).DeleteVertexCollection), ctx, name, opts)
623645
}
@@ -635,6 +657,7 @@ func (m *MockGraphVertexCollections) VertexCollection(ctx context.Context, name
635657
// VertexCollection indicates an expected call of VertexCollection.
636658
func (mr *MockGraphVertexCollectionsMockRecorder) VertexCollection(ctx, name any) *gomock.Call {
637659
mr.mock.ctrl.T.Helper()
660+
638661
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock,
639662
"VertexCollection", reflect.TypeOf((*MockGraphVertexCollections)(nil).VertexCollection), ctx, name)
640663
}
@@ -652,6 +675,7 @@ func (m *MockGraphVertexCollections) VertexCollectionExists(ctx context.Context,
652675
// VertexCollectionExists indicates an expected call of VertexCollectionExists.
653676
func (mr *MockGraphVertexCollectionsMockRecorder) VertexCollectionExists(ctx, name any) *gomock.Call {
654677
mr.mock.ctrl.T.Helper()
678+
655679
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock,
656680
"VertexCollectionExists", reflect.TypeOf((*MockGraphVertexCollections)(nil).VertexCollectionExists), ctx, name)
657681
}
@@ -669,6 +693,7 @@ func (m *MockGraphVertexCollections) VertexCollections(ctx context.Context) ([]a
669693
// VertexCollections indicates an expected call of VertexCollections.
670694
func (mr *MockGraphVertexCollectionsMockRecorder) VertexCollections(ctx any) *gomock.Call {
671695
mr.mock.ctrl.T.Helper()
696+
672697
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VertexCollections",
673698
reflect.TypeOf((*MockGraphVertexCollections)(nil).VertexCollections), ctx)
674699
}
@@ -711,6 +736,7 @@ func (m *MockGraphEdgesDefinition) CreateEdgeDefinition(ctx context.Context, col
711736
// CreateEdgeDefinition indicates an expected call of CreateEdgeDefinition.
712737
func (mr *MockGraphEdgesDefinitionMockRecorder) CreateEdgeDefinition(ctx, collection, from, to, opts any) *gomock.Call {
713738
mr.mock.ctrl.T.Helper()
739+
714740
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateEdgeDefinition",
715741
reflect.TypeOf((*MockGraphEdgesDefinition)(nil).CreateEdgeDefinition), ctx, collection, from, to, opts)
716742
}
@@ -729,6 +755,7 @@ func (m *MockGraphEdgesDefinition) DeleteEdgeDefinition(ctx context.Context, col
729755
// DeleteEdgeDefinition indicates an expected call of DeleteEdgeDefinition.
730756
func (mr *MockGraphEdgesDefinitionMockRecorder) DeleteEdgeDefinition(ctx, collection, opts any) *gomock.Call {
731757
mr.mock.ctrl.T.Helper()
758+
732759
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteEdgeDefinition",
733760
reflect.TypeOf((*MockGraphEdgesDefinition)(nil).DeleteEdgeDefinition), ctx, collection, opts)
734761
}
@@ -746,6 +773,7 @@ func (m *MockGraphEdgesDefinition) EdgeDefinition(ctx context.Context, collectio
746773
// EdgeDefinition indicates an expected call of EdgeDefinition.
747774
func (mr *MockGraphEdgesDefinitionMockRecorder) EdgeDefinition(ctx, collection any) *gomock.Call {
748775
mr.mock.ctrl.T.Helper()
776+
749777
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EdgeDefinition",
750778
reflect.TypeOf((*MockGraphEdgesDefinition)(nil).EdgeDefinition), ctx, collection)
751779
}
@@ -763,6 +791,7 @@ func (m *MockGraphEdgesDefinition) EdgeDefinitionExists(ctx context.Context, col
763791
// EdgeDefinitionExists indicates an expected call of EdgeDefinitionExists.
764792
func (mr *MockGraphEdgesDefinitionMockRecorder) EdgeDefinitionExists(ctx, collection any) *gomock.Call {
765793
mr.mock.ctrl.T.Helper()
794+
766795
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EdgeDefinitionExists",
767796
reflect.TypeOf((*MockGraphEdgesDefinition)(nil).EdgeDefinitionExists), ctx, collection)
768797
}
@@ -780,6 +809,7 @@ func (m *MockGraphEdgesDefinition) GetEdgeDefinitions(ctx context.Context) ([]ar
780809
// GetEdgeDefinitions indicates an expected call of GetEdgeDefinitions.
781810
func (mr *MockGraphEdgesDefinitionMockRecorder) GetEdgeDefinitions(ctx any) *gomock.Call {
782811
mr.mock.ctrl.T.Helper()
812+
783813
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEdgeDefinitions",
784814
reflect.TypeOf((*MockGraphEdgesDefinition)(nil).GetEdgeDefinitions), ctx)
785815
}

pkg/gofr/datasource/cassandra/cassandra.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ func (*Client) getFields(columns []string, fieldNameIndex map[string]int, v refl
292292
fields = append(fields, v.Field(i).Addr().Interface())
293293
} else {
294294
var i any
295+
295296
fields = append(fields, &i)
296297
}
297298
}
@@ -339,6 +340,7 @@ func (c *Client) sendOperationStats(ql *QueryLog, startTime time.Time, method st
339340

340341
if span != nil {
341342
defer span.End()
343+
342344
span.SetAttributes(attribute.Int64(fmt.Sprintf("cassandra.%v.duration", method), duration))
343345
}
344346

pkg/gofr/datasource/clickhouse/clickhouse.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ func (c *Client) Connect() {
8585
addresses := strings.Split(c.config.Hosts, ",")
8686

8787
ctx := context.Background()
88+
8889
c.conn, err = clickhouse.Open(&clickhouse.Options{
8990
Addr: addresses,
9091
Auth: clickhouse.Auth{
@@ -93,7 +94,6 @@ func (c *Client) Connect() {
9394
Password: c.config.Password,
9495
},
9596
})
96-
9797
if err != nil {
9898
c.logger.Errorf("error while connecting to Clickhouse %v", err)
9999

@@ -186,6 +186,7 @@ func (c *Client) sendOperationStats(start time.Time, methodType, query string, m
186186

187187
if span != nil {
188188
defer span.End()
189+
189190
span.SetAttributes(attribute.Int64(fmt.Sprintf("clickhouse.%v.duration", method), duration))
190191
}
191192

pkg/gofr/datasource/elasticsearch/documents.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ func (c *Client) UpdateDocument(ctx context.Context, index, id string, update ma
124124
}
125125

126126
res, err := req.Do(tracedCtx, c.client)
127-
128127
if err != nil {
129128
return fmt.Errorf("%w: updating document: %w", errOperation, err)
130129
}
@@ -161,7 +160,6 @@ func (c *Client) DeleteDocument(ctx context.Context, index, id string) error {
161160
}
162161

163162
res, err := req.Do(tracedCtx, c.client)
164-
165163
if err != nil {
166164
return fmt.Errorf("%w: deleting document: %w", errOperation, err)
167165
}

0 commit comments

Comments
 (0)