Skip to content

Commit 4f6c8f0

Browse files
committed
UPSTREAM: <carry>: Explicitly include mockgen model package in vendor directory
Include the `github.com/golang/mock/mockgen/model` package as an explicit dependency to support the mockgen utility. This change is necessary due to the rebasing to v2.8.2 and the downstream fork's reliance on the vendor directory for building the controller image in CI. Without this explicit inclusion, the package lookup fails with the error: "cannot find module providing package...import lookup disabled by -mod=vendor".
1 parent a371a27 commit 4f6c8f0

File tree

3 files changed

+509
-0
lines changed

3 files changed

+509
-0
lines changed

tools/tools.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package tools
2+
3+
import (
4+
// This package is explicitly included to support the mockgen utility,
5+
// which was introduced after rebasing to v2.8.2.
6+
// The downstream fork builds the image using the vendor directory,
7+
// where module lookup is disabled:
8+
// "cannot find module providing package github.com/golang/mock/mockgen/model:
9+
// import lookup disabled by -mod=vendor".
10+
// To ensure the package is included in the vendor directory,
11+
// it must be an explicit dependency.
12+
_ "github.com/golang/mock/mockgen/model"
13+
)

0 commit comments

Comments
 (0)