Skip to content

Commit 597c099

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

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

service/http/topic.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const (
4545
// Merge itemMap into topicEventJSON
4646
type topicEventJSON struct {
4747
// ID identifies the event.
48-
ID string `json:"id"` // y
48+
ID string `json:"id"`
4949
// The version of the CloudEvents specification.
5050
SpecVersion string `json:"specversion"`
5151
// The type of event related to the originating occurrence.

service/internal/topicregistrar.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ type TopicRegistrar map[string]*TopicRegistration
1414

1515
// TopicRegistration encapsulates the subscription and handlers.
1616
type TopicRegistration struct {
17-
Subscription *TopicSubscription
18-
DefaultHandler common.TopicEventHandler
19-
RouteHandlers map[string]common.TopicEventHandler
17+
Subscription *TopicSubscription
18+
DefaultHandler common.TopicEventHandler
19+
RouteHandlers map[string]common.TopicEventHandler
2020
}
2121

2222
func (m TopicRegistrar) AddSubscription(sub *common.Subscription, fn common.TopicEventHandler) error {
@@ -102,7 +102,7 @@ func (m TopicRegistrar) AddBulkSubscription(sub *common.Subscription, fn common.
102102
if err := ts.Subscription.SetDefaultRoute(sub.Route); err != nil {
103103
return err
104104
}
105-
105+
106106
ts.DefaultHandler = fn
107107
}
108108

service/internal/topicsubscription.go

+7-8
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,14 @@ type BulkSubscribeMessageItem struct {
3030
}
3131

3232
type BulkSubscribeEnvelope struct {
33-
ID string
34-
Entries []BulkSubscribeMessageItem
35-
Metadata map[string]string
36-
Topic string
37-
Pubsub string
38-
EventType string
33+
ID string `json:"id"`
34+
Entries []BulkSubscribeMessageItem `json:"entries"`
35+
Metadata map[string]string `json:"metadata"`
36+
Topic string `json:"topic"`
37+
Pubsub string `json:"pubsub"`
38+
EventType string `json:"eventType"`
3939
}
4040

41-
4241
type BulkSubscribe struct {
4342
Enabled bool `json:"enabled"`
4443
MaxMessagesCount int32 `json:"maxMessagesCount,omitempty"`
@@ -85,7 +84,7 @@ func (s *TopicSubscription) SetMetadata(metadata map[string]string) error {
8584
return nil
8685
}
8786

88-
func (s *TopicSubscription) SetBulkSubscribe(maxMessagesCount,maxAwaitDurationMs int32) error {
87+
func (s *TopicSubscription) SetBulkSubscribe(maxMessagesCount, maxAwaitDurationMs int32) error {
8988
if s.BulkSubscribe != nil {
9089
return fmt.Errorf("subscription for topic %s on pubsub %s already has bulkSubscribe set", s.Topic, s.PubsubName)
9190
}

0 commit comments

Comments
 (0)