Skip to content

Commit

Permalink
as: Use named return
Browse files Browse the repository at this point in the history
  • Loading branch information
adriansmares committed Nov 12, 2021
1 parent ce2bbdc commit 41ea812
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/applicationserver/io/mqtt/mqtt.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@ type topicAccess struct {
writes [][]string
}

func (c *connection) Connect(ctx context.Context, info *auth.Info) (context.Context, error) {
var err error
func (c *connection) Connect(ctx context.Context, info *auth.Info) (_ context.Context, err error) {
ids := ttnpb.ApplicationIdentifiers{
ApplicationId: info.Username,
}
Expand Down Expand Up @@ -270,7 +269,7 @@ func (c *connection) Connect(ctx context.Context, info *auth.Info) (context.Cont
}
}()

if err = rights.RequireApplication(ctx, ids); err != nil {
if err := rights.RequireApplication(ctx, ids); err != nil {
return nil, err
}

Expand Down

0 comments on commit 41ea812

Please sign in to comment.