diff --git a/go.mod b/go.mod index 2c6a2e9e..2901c62f 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module go.mau.fi/mautrix-telegram -go 1.23.0 +go 1.24.0 toolchain go1.24.4 @@ -73,3 +73,5 @@ require ( gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect maunium.net/go/mauflag v1.0.0 // indirect ) + +tool golang.org/x/tools/cmd/stringer diff --git a/pkg/gotd/_tools/go.mod b/pkg/gotd/_tools/go.mod deleted file mode 100644 index c12117d9..00000000 --- a/pkg/gotd/_tools/go.mod +++ /dev/null @@ -1,12 +0,0 @@ -module github.com/beeper/td/_tools - -go 1.22.0 - -toolchain go1.22.8 - -require golang.org/x/tools v0.27.0 - -require ( - golang.org/x/mod v0.22.0 // indirect - golang.org/x/sync v0.9.0 // indirect -) diff --git a/pkg/gotd/_tools/go.sum b/pkg/gotd/_tools/go.sum deleted file mode 100644 index a10e428f..00000000 --- a/pkg/gotd/_tools/go.sum +++ /dev/null @@ -1,6 +0,0 @@ -golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= -golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= -golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= -golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o= -golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q= diff --git a/pkg/gotd/_tools/tools.go b/pkg/gotd/_tools/tools.go deleted file mode 100644 index 3d7436fd..00000000 --- a/pkg/gotd/_tools/tools.go +++ /dev/null @@ -1,8 +0,0 @@ -//go:build tools -// +build tools - -package tools - -import ( - _ "golang.org/x/tools/cmd/stringer" -) diff --git a/pkg/gotd/fileid/photo_size_source_type.go b/pkg/gotd/fileid/photo_size_source_type.go index db5ac5b4..90b66227 100644 --- a/pkg/gotd/fileid/photo_size_source_type.go +++ b/pkg/gotd/fileid/photo_size_source_type.go @@ -1,6 +1,6 @@ package fileid -//go:generate go run -modfile=../_tools/go.mod golang.org/x/tools/cmd/stringer -type=PhotoSizeSourceType +//go:generate go tool golang.org/x/tools/cmd/stringer -type=PhotoSizeSourceType // PhotoSizeSourceType represents photo_size_source type. type PhotoSizeSourceType int diff --git a/pkg/gotd/fileid/type.go b/pkg/gotd/fileid/type.go index 94fdd3b1..0a928357 100644 --- a/pkg/gotd/fileid/type.go +++ b/pkg/gotd/fileid/type.go @@ -1,6 +1,6 @@ package fileid -//go:generate go run -modfile=../_tools/go.mod golang.org/x/tools/cmd/stringer -type=Type +//go:generate go tool golang.org/x/tools/cmd/stringer -type=Type // Type represents file_id type. type Type int diff --git a/pkg/gotd/telegram/internal/manager/conn.go b/pkg/gotd/telegram/internal/manager/conn.go index 8e4bcfa4..5731d3e7 100644 --- a/pkg/gotd/telegram/internal/manager/conn.go +++ b/pkg/gotd/telegram/internal/manager/conn.go @@ -24,7 +24,7 @@ type protoConn interface { Ping(ctx context.Context) error } -//go:generate go run -modfile=../../../_tools/go.mod golang.org/x/tools/cmd/stringer -type=ConnMode +//go:generate go tool golang.org/x/tools/cmd/stringer -type=ConnMode // ConnMode represents connection mode. type ConnMode byte diff --git a/pkg/gotd/telegram/peers/members/status.go b/pkg/gotd/telegram/peers/members/status.go index 65d8a1ec..1ebaae0f 100644 --- a/pkg/gotd/telegram/peers/members/status.go +++ b/pkg/gotd/telegram/peers/members/status.go @@ -1,6 +1,6 @@ package members -//go:generate go run -modfile=../../../_tools/go.mod golang.org/x/tools/cmd/stringer -type=Status +//go:generate go tool golang.org/x/tools/cmd/stringer -type=Status // Status defines participant status. type Status int