diff --git a/WORKSPACE b/WORKSPACE index 51d161ebf9918..6a3af98f950c6 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -18,7 +18,7 @@ http_archive( ], ) -load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") +load("@io_bazel_rules_go//go:deps.bzl", "go_download_sdk", "go_register_toolchains", "go_rules_dependencies") load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") load("//:DEPS.bzl", "go_deps") @@ -27,9 +27,19 @@ go_deps() go_rules_dependencies() +go_download_sdk( + name = "go_sdk", + urls = [ + "http://ats.apps.svc/golang/{}", + "http://bazel-cache.pingcap.net:8080/golang/{}", + "https://mirrors.aliyun.com/golang/{}", + "https://dl.google.com/go/{}", + ], + version = "1.19.3", +) + go_register_toolchains( nogo = "@//build:tidb_nogo", - version = "1.19.3", ) gazelle_dependencies()