Skip to content

Commit

Permalink
try to fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
almostinf committed Jun 27, 2024
1 parent e5d5384 commit 961f107
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd/cli/telegram_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func updateTelegramUsersRecords(logger moira.Logger, database moira.Database) er
key := iter.Val()
if strings.HasPrefix(key, telegramLockName) {
continue
}
}

oldValue, err := d.Client().Get(d.Context(), key).Result()
if err != nil {
Expand Down Expand Up @@ -86,7 +86,7 @@ func downgradeTelegramUsersRecords(logger moira.Logger, database moira.Database)
key := iter.Val()
if strings.HasPrefix(key, telegramLockName) {
continue
}
}

oldValue, err := d.Client().Get(d.Context(), key).Result()
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ require (
github.com/go-redsync/redsync/v4 v4.4.4
github.com/gofrs/uuid v4.2.0+incompatible
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
github.com/golang/mock v1.6.0
github.com/google/go-cmp v0.6.0
github.com/gotokatsuya/ipare v0.0.0-20161202043954-fd52c5b6c44b
github.com/gregdel/pushover v1.1.0
Expand Down
1 change: 0 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,6 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
Expand Down
3 changes: 1 addition & 2 deletions senders/telegram/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ func (sender *Sender) getChatFromDb(contactValue string) (*Chat, error) {
}

chat := Chat{}
err = json.Unmarshal([]byte(chatRaw), &chat)
if err != nil {
if err = json.Unmarshal([]byte(chatRaw), &chat); err != nil {
// For Moira < 2.12.0 compatibility
// Before 2.12.0 `moira-telegram-users:user` only stored telegram channel IDs
// After 2.12.0 `moira-telegram-users:user` stores Chat structure
Expand Down

0 comments on commit 961f107

Please sign in to comment.