Skip to content

Commit 10d2c67

Browse files
committed
lint fix
Signed-off-by: sadath-12 <[email protected]>
1 parent 597c099 commit 10d2c67

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

service/http/topic.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ const (
127127

128128
type BulkSubscribeResponseEntry struct {
129129
// The id of the bulk subscribe entry
130-
EntryId string `json:"entryId"`
130+
EntryId string `json:"entryId"` //nolint:stylecheck
131131

132132
// The response status of the bulk subscribe entry
133133
Status AppResponseStatus `json:"status"`
@@ -367,14 +367,14 @@ func (s *Server) AddBulkTopicEventHandler(sub *common.Subscription, fn common.To
367367
statuses := make([]BulkSubscribeResponseEntry, 0, len(ins.Entries))
368368

369369
for _, entry := range ins.Entries {
370-
itemJSON, err := json.Marshal(entry.Event)
371-
if err != nil {
372-
http.Error(w, err.Error(), PubSubHandlerDropStatusCode)
370+
itemJSON, entryErr := json.Marshal(entry.Event)
371+
if entryErr != nil {
372+
http.Error(w, entryErr.Error(), PubSubHandlerDropStatusCode)
373373
return
374374
}
375375
var in topicEventJSON
376376

377-
if err := json.Unmarshal(itemJSON, &in); err != nil {
377+
if err = json.Unmarshal(itemJSON, &in); err != nil {
378378
http.Error(w, err.Error(), PubSubHandlerDropStatusCode)
379379
return
380380
}
@@ -400,8 +400,8 @@ func (s *Server) AddBulkTopicEventHandler(sub *common.Subscription, fn common.To
400400
Topic: in.Topic,
401401
}
402402

403-
retry, err := fn(r.Context(), &te)
404-
if err == nil {
403+
retry, funcErr := fn(r.Context(), &te)
404+
if funcErr == nil {
405405
statuses = append(statuses, BulkSubscribeResponseEntry{
406406
EntryId: entry.EntryId,
407407
Status: Success,

0 commit comments

Comments
 (0)