Skip to content

Commit 7e18362

Browse files
authored
upgrade to go 1.24 (#2217)
1 parent eb84ede commit 7e18362

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+15
-9454
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: "setup go"
2020
uses: "actions/setup-go@v3"
2121
with:
22-
go-version: "1.23"
22+
go-version: "1.24"
2323
- name: "install python3-pytest"
2424
run: "sudo apt install -y python3-pytest"
2525
- name: "make install"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## build ergo binary
2-
FROM docker.io/golang:1.23-alpine AS build-env
2+
FROM docker.io/golang:1.24-alpine AS build-env
33

44
RUN apk upgrade -U --force-refresh --no-cache && apk add --no-cache --purge --clean-protected -l -u make git
55

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/ergochat/ergo
22

3-
go 1.23
3+
go 1.24
44

55
require (
66
code.cloudfoundry.org/bytefmt v0.0.0-20200131002437-cf55d5288a48

irc/accounts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,7 @@ func (am *AccountManager) NsSendpass(client *Client, accountName string) (err er
11571157
message := email.ComposeMail(config.Accounts.Registration.EmailVerification, account.Settings.Email, subject)
11581158
fmt.Fprintf(&message, client.t("We received a request to reset your password on %[1]s for account: %[2]s"), am.server.name, account.Name)
11591159
message.WriteString("\r\n")
1160-
fmt.Fprintf(&message, client.t("If you did not initiate this request, you can safely ignore this message."))
1160+
message.WriteString(client.t("If you did not initiate this request, you can safely ignore this message."))
11611161
message.WriteString("\r\n")
11621162
message.WriteString("\r\n")
11631163
message.WriteString(client.t("Otherwise, to reset your password, issue the following command (replace `new_password` with your desired password):"))

irc/cloaks/cloaks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"fmt"
77
"net"
88

9-
"golang.org/x/crypto/sha3"
9+
"crypto/sha3"
1010

1111
"github.com/ergochat/ergo/irc/utils"
1212
)

irc/modes.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,9 @@ func (channel *Channel) ApplyChannelModeChanges(client *Client, isSamode bool, c
266266
case modes.Add:
267267
ch := client.server.channels.Get(change.Arg)
268268
if ch == nil {
269-
rb.Add(nil, client.server.name, ERR_INVALIDMODEPARAM, details.nick, chname, string(change.Mode), utils.SafeErrorParam(change.Arg), fmt.Sprintf(client.t("No such channel")))
269+
rb.Add(nil, client.server.name, ERR_INVALIDMODEPARAM, details.nick, chname, string(change.Mode), utils.SafeErrorParam(change.Arg), client.t("No such channel"))
270270
} else if ch == channel {
271-
rb.Add(nil, client.server.name, ERR_INVALIDMODEPARAM, details.nick, chname, string(change.Mode), utils.SafeErrorParam(change.Arg), fmt.Sprintf(client.t("You can't forward a channel to itself")))
271+
rb.Add(nil, client.server.name, ERR_INVALIDMODEPARAM, details.nick, chname, string(change.Mode), utils.SafeErrorParam(change.Arg), client.t("You can't forward a channel to itself"))
272272
} else {
273273
if isSamode || ch.ClientIsAtLeast(client, modes.ChannelOperator) {
274274
change.Arg = ch.Name()

irc/passwd/bcrypt.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33

44
package passwd
55

6-
import "golang.org/x/crypto/bcrypt"
7-
import "golang.org/x/crypto/sha3"
6+
import (
7+
"crypto/sha3"
8+
9+
"golang.org/x/crypto/bcrypt"
10+
)
811

912
const (
1013
MinCost = bcrypt.MinCost

irc/smtp/smtp.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ func (c *Client) Auth(a Auth) error {
233233
}
234234
resp64 := make([]byte, encoding.EncodedLen(len(resp)))
235235
encoding.Encode(resp64, resp)
236-
code, msg64, err := c.cmd(0, strings.TrimSpace(fmt.Sprintf("AUTH %s %s", mech, resp64)))
236+
code, msg64, err := c.cmd(0, "%s", strings.TrimSpace(fmt.Sprintf("AUTH %s %s", mech, resp64)))
237237
for err == nil {
238238
var msg []byte
239239
switch code {
@@ -259,7 +259,7 @@ func (c *Client) Auth(a Auth) error {
259259
}
260260
resp64 = make([]byte, encoding.EncodedLen(len(resp)))
261261
encoding.Encode(resp64, resp)
262-
code, msg64, err = c.cmd(0, string(resp64))
262+
code, msg64, err = c.cmd(0, "%s", resp64)
263263
}
264264
return err
265265
}

irc/uban.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ func ubanInfoNick(client *Client, target ubanTarget, rb *ResponseBuffer) {
455455
rb.Notice(client.t("Warning: banning this IP or a network that contains it may affect other users. Use /UBAN INFO on the candidate IP or network for more information."))
456456
}
457457
} else {
458-
rb.Notice(fmt.Sprintf(client.t("No client is currently using that nickname")))
458+
rb.Notice(client.t("No client is currently using that nickname"))
459459
}
460460

461461
account, err := client.server.accounts.LoadAccount(target.nickOrMask)

vendor/golang.org/x/crypto/sha3/doc.go

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)