[chore] Upgrade to Go 1.24 (#4187)

* Set `go.mod` to 1.24 now that it's been out for 3 months.
* Update all the test to use `testing.T.Context()`.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4187
Co-authored-by: Daenney <git@noreply.sourcery.dny.nu>
Co-committed-by: Daenney <git@noreply.sourcery.dny.nu>
This commit is contained in:
Daenney 2025-05-22 12:26:11 +02:00 committed by kim
commit d5c9c4adc1
175 changed files with 857 additions and 1004 deletions

View file

@ -18,7 +18,6 @@
package bundb_test
import (
"context"
"slices"
"testing"
"time"
@ -32,7 +31,7 @@ type DomainTestSuite struct {
}
func (suite *DomainTestSuite) TestIsDomainBlocked() {
ctx := context.Background()
ctx := suite.T().Context()
domainBlock := &gtsmodel.DomainBlock{
ID: "01G204214Y9TNJEBX39C7G88SW",
@ -57,7 +56,7 @@ func (suite *DomainTestSuite) TestIsDomainBlocked() {
}
func (suite *DomainTestSuite) TestIsDomainBlockedWithAllow() {
ctx := context.Background()
ctx := suite.T().Context()
domainBlock := &gtsmodel.DomainBlock{
ID: "01G204214Y9TNJEBX39C7G88SW",
@ -110,7 +109,7 @@ func (suite *DomainTestSuite) TestIsDomainBlockedWithAllow() {
}
func (suite *DomainTestSuite) TestIsDomainBlockedWildcard() {
ctx := context.Background()
ctx := suite.T().Context()
domainBlock := &gtsmodel.DomainBlock{
ID: "01G204214Y9TNJEBX39C7G88SW",
@ -142,7 +141,7 @@ func (suite *DomainTestSuite) TestIsDomainBlockedWildcard() {
}
func (suite *DomainTestSuite) TestIsDomainBlockedNonASCII() {
ctx := context.Background()
ctx := suite.T().Context()
now := time.Now()
@ -178,7 +177,7 @@ func (suite *DomainTestSuite) TestIsDomainBlockedNonASCII() {
}
func (suite *DomainTestSuite) TestIsDomainBlockedNonASCII2() {
ctx := context.Background()
ctx := suite.T().Context()
now := time.Now()
@ -214,7 +213,7 @@ func (suite *DomainTestSuite) TestIsDomainBlockedNonASCII2() {
}
func (suite *DomainTestSuite) TestIsOtherDomainBlockedWildcardAndExplicit() {
ctx := context.Background()
ctx := suite.T().Context()
blocks := []*gtsmodel.DomainBlock{
{