mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-27 18:12:50 +01:00
fix: re-enable CI lint job and fix ~65 lint errors (partial)
Re-enable the golangci-lint job in CI (disabled Oct 2025), update to Go 1.25 and golangci-lint-action v7. Fix errcheck, gosimple S1009, staticcheck SA4031 and SA2001 errors across 54 files. Remaining ~39 lint errors will be addressed in follow-up commits.
This commit is contained in:
@@ -15,7 +15,7 @@ func (s *Server) onInteraction(ds *discordgo.Session, i *discordgo.InteractionCr
|
||||
var temp string
|
||||
err := s.db.QueryRow(`UPDATE users SET discord_id = $1 WHERE discord_token = $2 RETURNING discord_id`, i.Member.User.ID, i.ApplicationCommandData().Options[0].StringValue()).Scan(&temp)
|
||||
if err == nil {
|
||||
ds.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
|
||||
_ = ds.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
|
||||
Type: discordgo.InteractionResponseChannelMessageWithSource,
|
||||
Data: &discordgo.InteractionResponseData{
|
||||
Content: "Your Erupe account was linked successfully.",
|
||||
@@ -23,7 +23,7 @@ func (s *Server) onInteraction(ds *discordgo.Session, i *discordgo.InteractionCr
|
||||
},
|
||||
})
|
||||
} else {
|
||||
ds.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
|
||||
_ = ds.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
|
||||
Type: discordgo.InteractionResponseChannelMessageWithSource,
|
||||
Data: &discordgo.InteractionResponseData{
|
||||
Content: "Failed to link Erupe account.",
|
||||
@@ -35,7 +35,7 @@ func (s *Server) onInteraction(ds *discordgo.Session, i *discordgo.InteractionCr
|
||||
password, _ := bcrypt.GenerateFromPassword([]byte(i.ApplicationCommandData().Options[0].StringValue()), 10)
|
||||
_, err := s.db.Exec(`UPDATE users SET password = $1 WHERE discord_id = $2`, password, i.Member.User.ID)
|
||||
if err == nil {
|
||||
ds.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
|
||||
_ = ds.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
|
||||
Type: discordgo.InteractionResponseChannelMessageWithSource,
|
||||
Data: &discordgo.InteractionResponseData{
|
||||
Content: "Your Erupe account password has been updated.",
|
||||
@@ -43,7 +43,7 @@ func (s *Server) onInteraction(ds *discordgo.Session, i *discordgo.InteractionCr
|
||||
},
|
||||
})
|
||||
} else {
|
||||
ds.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
|
||||
_ = ds.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
|
||||
Type: discordgo.InteractionResponseChannelMessageWithSource,
|
||||
Data: &discordgo.InteractionResponseData{
|
||||
Content: "Failed to update Erupe account password.",
|
||||
|
||||
Reference in New Issue
Block a user