Skip to content

Commit

Permalink
chore(deps): upgrade rules_go
Browse files Browse the repository at this point in the history
  • Loading branch information
tranngoclam authored and Lam Tran committed Feb 10, 2024
1 parent 69e0022 commit a54221e
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 26 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Prerequisites

- Go 1.21+
- Go 1.22+
- Bazelisk

## Using Go Workspace
Expand Down
9 changes: 4 additions & 5 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "io_bazel_rules_go",
sha256 = "6734a719993b1ba4ebe9806e853864395a8d3968ad27f9dd759c196b3eb3abe8",
sha256 = "80a98277ad1311dacd837f9b16db62887702e9f1d1c4c9f796d0121a46c8e184",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.45.1/rules_go-v0.45.1.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.45.1/rules_go-v0.45.1.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.46.0/rules_go-v0.46.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.46.0/rules_go-v0.46.0.zip",
],
)

Expand All @@ -18,7 +18,6 @@ http_archive(
],
)


load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")

Expand All @@ -35,7 +34,7 @@ go_dependencies()

go_rules_dependencies()

go_register_toolchains(version = "1.21.6")
go_register_toolchains(version = "1.22.0")

gazelle_dependencies()

Expand Down
2 changes: 1 addition & 1 deletion api/gen/money/v1/money.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions api/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module api

go 1.21
go 1.22.0

require google.golang.org/protobuf v1.31.0
require google.golang.org/protobuf v1.32.0
6 changes: 2 additions & 4 deletions api/go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
2 changes: 1 addition & 1 deletion bar/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.21 AS build
FROM --platform=$BUILDPLATFORM golang:1.22-alpine AS build

WORKDIR /src

Expand Down
2 changes: 1 addition & 1 deletion bar/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module bar

go 1.21
go 1.22.0

require github.com/gorilla/mux v1.8.1
4 changes: 2 additions & 2 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ plugins:
out: api/gen
opt:
- paths=source_relative
- plugin: buf.build/protocolbuffers/go:v1.31.0
- plugin: buf.build/protocolbuffers/go:v1.32.0
out: api/gen
opt:
- paths=source_relative
- plugin: buf.build/grpc-ecosystem/gateway:v2.18.1
- plugin: buf.build/grpc-ecosystem/gateway:v2.19.1
out: api/gen
opt:
- paths=source_relative
9 changes: 4 additions & 5 deletions deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ def go_dependencies():
sum = "h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=",
version = "v0.5.5",
)

go_repository(
name = "com_github_gorilla_mux",
build_file_proto_mode = "disable_global",
importpath = "github.com/gorilla/mux",
sum = "h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=",
version = "v1.8.0",
sum = "h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=",
version = "v1.8.1",
)
go_repository(
name = "com_github_pmezard_go_difflib",
Expand Down Expand Up @@ -69,8 +68,8 @@ def go_dependencies():
name = "org_golang_google_protobuf",
build_file_proto_mode = "disable_global",
importpath = "google.golang.org/protobuf",
sum = "h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=",
version = "v1.31.0",
sum = "h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=",
version = "v1.32.0",
)
go_repository(
name = "org_golang_x_xerrors",
Expand Down
2 changes: 1 addition & 1 deletion foo/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.21 AS build
FROM --platform=$BUILDPLATFORM golang:1.22-alpine AS build

WORKDIR /src

Expand Down
2 changes: 1 addition & 1 deletion foo/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module foo

go 1.21
go 1.22.0

require github.com/stretchr/testify v1.8.4

Expand Down
2 changes: 1 addition & 1 deletion go.work
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
go 1.21
go 1.22.0

use (
./api
Expand Down
2 changes: 1 addition & 1 deletion lib/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module lib

go 1.21
go 1.22.0

require github.com/stretchr/testify v1.8.4

Expand Down

0 comments on commit a54221e

Please sign in to comment.