Skip to content

Commit

Permalink
Fix: move before declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
ikafly144 committed Jul 19, 2024
1 parent 894078d commit 1a47ba1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bot/commands/message/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ func Command(c *components.Components) *generic.Command {
}

// 語尾の処理
var w *ent.WordSuffix

if e.Message.Type.System() || e.Message.Author.System || e.Message.Author.Bot {
goto messagePin

Check failure on line 724 in bot/commands/message/message.go

View workflow job for this annotation

GitHub Actions / test (1.22)

goto messagePin jumps over declaration of u, err at bot/commands/message/message.go:730:12

Check failure on line 724 in bot/commands/message/message.go

View workflow job for this annotation

GitHub Actions / lint

goto messagePin jumps over declaration of u, err at bot/commands/message/message.go:730:12
Expand All @@ -732,8 +733,6 @@ func Command(c *components.Components) *generic.Command {
return errors.NewError(err)
}

var w *ent.WordSuffix

if u.QueryWordSuffix().Where(wordsuffix.GuildID(e.GuildID)).ExistX(e) {
// Guild
w = u.QueryWordSuffix().Where(wordsuffix.GuildID(e.GuildID)).FirstX(e)
Expand Down

0 comments on commit 1a47ba1

Please sign in to comment.