Skip to content

Commit

Permalink
fix lint issues
Browse files Browse the repository at this point in the history
Signed-off-by: Jeeva Kandasamy <[email protected]>
  • Loading branch information
jkandasa committed Mar 30, 2024
1 parent 546d5cd commit 15d8427
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ^1.20
go-version: ^1.21

- name: golangci-lint
uses: golangci/golangci-lint-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_executables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: ^1.20
go-version: ^1.21

- name: Cache go modules
uses: actions/cache@v2
Expand Down
6 changes: 5 additions & 1 deletion cmd/sub/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ var rootCmd = &cobra.Command{
// start service
ctx := context.Background()
toMqtt := helper.ToMqtt{}
toMqtt.Start(ctx, cfg)
err = toMqtt.Start(ctx, cfg)
if err != nil {
logger.Fatal("error on starting the service", zap.Error(err))
}

},
}

Expand Down
10 changes: 6 additions & 4 deletions pkg/service/adapter/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,10 @@ func (s *Service) mqttMessageProcessor(item interface{}) {
if err != nil {
s.logger.Error("error on writing a message to mqtt", zap.String("adapterName", s.adapterConfig.Name), zap.String("provider", s.adapterConfig.Provider), zap.Error(err))
}
} else {
// TODO: this message will be dropped, needs to handle this message
}
// else {
// TODO: this message will be dropped, needs to handle this message
// }
}

func (s *Service) sourceMessageProcessor(item interface{}) {
Expand All @@ -165,9 +166,10 @@ func (s *Service) sourceMessageProcessor(item interface{}) {
if err != nil {
s.logger.Error("error on writing a message to source device", zap.String("adapterName", s.adapterConfig.Name), zap.String("provider", s.adapterConfig.Provider), zap.Error(err))
}
} else {
// TODO: this message will be dropped, needs to handle this message
}
// else {
// TODO: this message will be dropped, needs to handle this message
// }
}

func (s *Service) onMqttMessage(message *types.Message) {
Expand Down

0 comments on commit 15d8427

Please sign in to comment.