Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update module path to adhere with Go versioning guidelines #177

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

epk
Copy link
Contributor

@epk epk commented Jan 9, 2023

Signed-off-by: Aditya Sharma [email protected]

Context

When trying to install/import [email protected] as a Go dependency, the toolchain throws the following error.

go install github.com/cloudflare/ebpf_exporter/cmd/[email protected]
go: github.com/cloudflare/ebpf_exporter/cmd/[email protected]: github.com/cloudflare/[email protected]: invalid version: module contains a go.mod file, so module path must match major version ("github.com/cloudflare/ebpf_exporter/v2")

OR

go get github.com/cloudflare/[email protected]
go: github.com/cloudflare/[email protected]: invalid version: module contains a go.mod file, so module path must match major version ("github.com/cloudflare/ebpf_exporter/v2")

Fix

Updated the module paths to include /v2 by using https://github.com/icholy/gomajor:

gomajor path -next

cc @bobrik

Signed-off-by: Aditya Sharma <[email protected]>
@bobrik bobrik merged commit 4ae8d7b into cloudflare:master Jan 19, 2023
@bobrik
Copy link
Contributor

bobrik commented Jan 19, 2023

Makes sense, thanks! What are you embedding ebpf_exporter into?

@epk
Copy link
Contributor Author

epk commented Jan 20, 2023

Makes sense, thanks! What are you embedding ebpf_exporter into?

Instead of having a fork just for building a docker image, we declare github.com/cloudflare/ebpf_exporter/v2/cmd/ebpf_exporter as a Go dependency1 and build it alongside our eBPF probes.

Footnotes

  1. https://github.com/go-modules-by-example/index/blob/ac9bf72/010_tools/README.md

@epk epk deleted the epk/fix-module-path branch January 20, 2023 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants