Skip to content

Commit

Permalink
deps: Use golang workspace for multi-module repository
Browse files Browse the repository at this point in the history
Golang has workspaces feature to support repositories with
multiple modules. This commit configures this repository to use it.
With this change, we only need one vendor directory

Signed-off-by: Andrej Krejcir <[email protected]>
  • Loading branch information
akrejcir committed Jul 19, 2024
1 parent e80cdba commit 9fd81d4
Show file tree
Hide file tree
Showing 550 changed files with 648 additions and 329,825 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ WORKDIR /workspace
# Copy the Go Modules manifests and vendor directory
COPY go.mod go.mod
COPY go.sum go.sum
COPY go.work go.work
COPY go.work.sum go.work.sum
COPY vendor/ vendor/

# Copy the go source
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,9 @@ vet:
# Update vendor modules
.PHONY: vendor
vendor:
cd api && go mod tidy
go mod tidy
go mod vendor
go work vendor

# Validate that this repository does not contain offensive language
.PHONY: validate-no-offensive-lang
Expand Down
29 changes: 22 additions & 7 deletions api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,41 @@ go 1.22.4
require (
github.com/openshift/api v0.0.0-20240419172957-f39cf2ef93fd // release-4.16
k8s.io/apimachinery v0.29.4
kubevirt.io/containerized-data-importer-api v1.58.0
kubevirt.io/containerized-data-importer-api v1.59.0
kubevirt.io/controller-lifecycle-operator-sdk/api v0.2.4
sigs.k8s.io/controller-runtime v0.16.3
sigs.k8s.io/controller-runtime v0.17.3
)

require (
github.com/go-logr/logr v1.3.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-task/slim-sprig v2.20.0+incompatible // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20230510103437-eeec1cb781c3 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/onsi/ginkgo/v2 v2.15.0 // indirect
github.com/onsi/gomega v1.32.0 // indirect
github.com/openshift/custom-resource-status v1.1.2 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/text v0.14.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/stretchr/testify v1.9.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/api v0.29.4 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/utils v0.0.0-20240310230437-4693a0247e57 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)
82 changes: 48 additions & 34 deletions api/go.sum

Large diffs are not rendered by default.

26 changes: 0 additions & 26 deletions api/vendor/github.com/go-logr/logr/.golangci.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions api/vendor/github.com/go-logr/logr/CHANGELOG.md

This file was deleted.

17 changes: 0 additions & 17 deletions api/vendor/github.com/go-logr/logr/CONTRIBUTING.md

This file was deleted.

201 changes: 0 additions & 201 deletions api/vendor/github.com/go-logr/logr/LICENSE

This file was deleted.

Loading

0 comments on commit 9fd81d4

Please sign in to comment.