mirror of
https://github.com/github/codeql.git
synced 2026-02-11 20:51:06 +01:00
Move private registry sources out of util package
This commit is contained in:
16
go/extractor/registries/BUILD.bazel
generated
Normal file
16
go/extractor/registries/BUILD.bazel
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
# generated running `bazel run //go/gazelle`, do not edit
|
||||
|
||||
load("@rules_go//go:def.bzl", "go_library", "go_test")
|
||||
|
||||
go_library(
|
||||
name = "registries",
|
||||
srcs = ["registryproxy.go"],
|
||||
importpath = "github.com/github/codeql-go/extractor/registries",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
go_test(
|
||||
name = "registries_test",
|
||||
srcs = ["registryproxy_test.go"],
|
||||
embed = [":registries"],
|
||||
)
|
||||
@@ -1,4 +1,4 @@
|
||||
package util
|
||||
package registries
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
@@ -1,4 +1,4 @@
|
||||
package util
|
||||
package registries
|
||||
|
||||
import (
|
||||
"testing"
|
||||
5
go/extractor/toolchain/BUILD.bazel
generated
5
go/extractor/toolchain/BUILD.bazel
generated
@@ -7,7 +7,10 @@ go_library(
|
||||
srcs = ["toolchain.go"],
|
||||
importpath = "github.com/github/codeql-go/extractor/toolchain",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["//go/extractor/util"],
|
||||
deps = [
|
||||
"//go/extractor/registries",
|
||||
"//go/extractor/util",
|
||||
],
|
||||
)
|
||||
|
||||
go_test(
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/github/codeql-go/extractor/registries"
|
||||
"github.com/github/codeql-go/extractor/util"
|
||||
)
|
||||
|
||||
@@ -140,7 +141,7 @@ func SupportsWorkspaces() bool {
|
||||
// Constructs a `*exec.Cmd` for `go` with the specified arguments.
|
||||
func GoCommand(arg ...string) *exec.Cmd {
|
||||
cmd := exec.Command("go", arg...)
|
||||
util.ApplyProxyEnvVars(cmd)
|
||||
registries.ApplyProxyEnvVars(cmd)
|
||||
return cmd
|
||||
}
|
||||
|
||||
|
||||
2
go/extractor/util/BUILD.bazel
generated
2
go/extractor/util/BUILD.bazel
generated
@@ -8,7 +8,6 @@ go_library(
|
||||
"extractvendordirs.go",
|
||||
"logging.go",
|
||||
"overlays.go",
|
||||
"registryproxy.go",
|
||||
"semver.go",
|
||||
"util.go",
|
||||
],
|
||||
@@ -21,7 +20,6 @@ go_test(
|
||||
name = "util_test",
|
||||
srcs = [
|
||||
"logging_test.go",
|
||||
"registryproxy_test.go",
|
||||
"semver_test.go",
|
||||
"util_test.go",
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user