1
0
mirror of https://github.com/etcd-io/etcd.git synced 2026-02-05 15:46:51 +01:00

Replace FORBIDDEN_DEPENDENCIES with gomodguard

Signed-off-by: Ivan Valdes <ivan@vald.es>
This commit is contained in:
Ivan Valdes
2025-09-30 11:37:37 -07:00
parent 678df5f5fb
commit 3062d2bcdf
12 changed files with 62 additions and 52 deletions

13
api/.gomodguard.yaml Normal file
View File

@@ -0,0 +1,13 @@
---
blocked:
modules:
- go.etcd.io/etcd:
reason: "Forbidden dependency"
- go.etcd.io/etcd/api/v3:
reason: "Forbidden dependency"
- go.etcd.io/etcd/pkg/v3:
reason: "Forbidden dependency"
- go.etcd.io/etcd/tests/v3:
reason: "Forbidden dependency"
- go.etcd.io/etcd/v3:
reason: "Forbidden dependency"

View File

@@ -26,13 +26,3 @@ require (
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
// Bad imports are sometimes causing attempts to pull that code.
// This makes the error more explicit.
replace (
go.etcd.io/etcd => ./FORBIDDEN_DEPENDENCY
go.etcd.io/etcd/api/v3 => ./FORBIDDEN_DEPENDENCY
go.etcd.io/etcd/pkg/v3 => ./FORBIDDEN_DEPENDENCY
go.etcd.io/etcd/tests/v3 => ./FORBIDDEN_DEPENDENCY
go.etcd.io/etcd/v3 => ./FORBIDDEN_DEPENDENCY
)

View File

@@ -0,0 +1,11 @@
---
blocked:
modules:
- go.etcd.io/etcd:
reason: "Forbidden dependency"
- go.etcd.io/etcd/pkg/v3:
reason: "Forbidden dependency"
- go.etcd.io/etcd/tests/v3:
reason: "Forbidden dependency"
- go.etcd.io/etcd/v3:
reason: "Forbidden dependency"

View File

@@ -46,12 +46,3 @@ replace (
go.etcd.io/etcd/api/v3 => ../../api
go.etcd.io/etcd/client/pkg/v3 => ../pkg
)
// Bad imports are sometimes causing attempts to pull that code.
// This makes the error more explicit.
replace (
go.etcd.io/etcd => ./FORBIDDEN_DEPENDENCY
go.etcd.io/etcd/pkg/v3 => ./FORBIDDEN_DEPENDENCY
go.etcd.io/etcd/v3 => ./FORBIDDEN_DEPENDENCY
go.etcd.io/tests/v3 => ./FORBIDDEN_DEPENDENCY
)

9
etcdctl/.gomodguard.yaml Normal file
View File

@@ -0,0 +1,9 @@
---
blocked:
modules:
- go.etcd.io/etcd:
reason: "Forbidden dependency"
- go.etcd.io/etcd/tests/v3:
reason: "Forbidden dependency"
- go.etcd.io/etcd/v3:
reason: "Forbidden dependency"

View File

@@ -54,11 +54,3 @@ replace (
go.etcd.io/etcd/client/v3 => ../client/v3
go.etcd.io/etcd/pkg/v3 => ../pkg
)
// Bad imports are sometimes causing attempts to pull that code.
// This makes the error more explicit.
replace (
go.etcd.io/etcd => ./FORBIDDEN_DEPENDENCY
go.etcd.io/etcd/v3 => ./FORBIDDEN_DEPENDENCY
go.etcd.io/tests/v3 => ./FORBIDDEN_DEPENDENCY
)

9
etcdutl/.gomodguard.yaml Normal file
View File

@@ -0,0 +1,9 @@
---
blocked:
modules:
- go.etcd.io/etcd:
reason: "Forbidden dependency"
- go.etcd.io/etcd/tests/v3:
reason: "Forbidden dependency"
- go.etcd.io/etcd/v3:
reason: "Forbidden dependency"

View File

@@ -12,14 +12,6 @@ replace (
go.etcd.io/etcd/server/v3 => ../server
)
// Bad imports are sometimes causing attempts to pull that code.
// This makes the error more explicit.
replace (
go.etcd.io/etcd => ./FORBIDDEN_DEPENDENCY
go.etcd.io/etcd/v3 => ./FORBIDDEN_DEPENDENCY
go.etcd.io/tests/v3 => ./FORBIDDEN_DEPENDENCY
)
require (
github.com/coreos/go-semver v0.3.1
github.com/dustin/go-humanize v1.0.1

11
pkg/.gomodguard.yaml Normal file
View File

@@ -0,0 +1,11 @@
---
blocked:
modules:
- go.etcd.io/etcd:
reason: "Forbidden dependency"
- go.etcd.io/etcd/api/v3:
reason: "Forbidden dependency"
- go.etcd.io/etcd/tests/v3:
reason: "Forbidden dependency"
- go.etcd.io/etcd/v3:
reason: "Forbidden dependency"

View File

@@ -32,14 +32,3 @@ require (
)
replace go.etcd.io/etcd/client/pkg/v3 => ../client/pkg
// Bad imports are sometimes causing attempts to pull that code.
// This makes the error more explicit.
// Etcd contains lots of packages and dependency relationship.
// Shouldn't import unnecessary dependencies
replace (
go.etcd.io/etcd => ./FORBIDDEN_DEPENDENCY
go.etcd.io/etcd/api/v3 => ./FORBIDDEN_DEPENDENCY
go.etcd.io/etcd/tests/v3 => ./FORBIDDEN_DEPENDENCY
go.etcd.io/etcd/v3 => ./FORBIDDEN_DEPENDENCY
)

9
server/.gomodguard.yaml Normal file
View File

@@ -0,0 +1,9 @@
---
blocked:
modules:
- go.etcd.io/etcd:
reason: "Forbidden dependency"
- go.etcd.io/etcd/tests/v3:
reason: "Forbidden dependency"
- go.etcd.io/etcd/v3:
reason: "Forbidden dependency"

View File

@@ -82,9 +82,3 @@ replace (
go.etcd.io/etcd/client/v3 => ../client/v3
go.etcd.io/etcd/pkg/v3 => ../pkg
)
// Bad imports are sometimes causing attempts to pull that code.
// This makes the error more explicit.
replace go.etcd.io/etcd => ./FORBIDDEN_DEPENDENCY
replace go.etcd.io/tests/v3 => ./FORBIDDEN_DEPENDENCY