fix: add /v2 module path for Go v2 compatibility#127
Open
mrhinton101 wants to merge 12 commits intoPaloAltoNetworks:mainfrom
Open
fix: add /v2 module path for Go v2 compatibility#127mrhinton101 wants to merge 12 commits intoPaloAltoNetworks:mainfrom
mrhinton101 wants to merge 12 commits intoPaloAltoNetworks:mainfrom
Conversation
remove unrelated linting
remove unrelated linting
remove unrelated linting
remove unrelated linting
remove unrelated linting
remove unrelated linting
remove unrelated linting
Author
|
Ready for Review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
###Description
This change updates the module path and internal imports to make the pango module compatible with Go’s semantic import versioning for v2.x.
Changes include:
• Updating the go.mod path to module github.com/PaloAltoNetworks/pango/v2
• Updating all internal import paths to include the /v2 suffix
• Updating and verifying the example/main.go file to reflect the new module structure
###Motivation and Context
Go module tooling requires that any version v2.0.0 or later include a /v2 suffix in both the go.mod declaration and all import paths. Without this, consumers of the module encounter errors like:
go: github.com/PaloAltoNetworks/pango@v2.0.0-rc6: invalid version: module contains a go.mod file with the wrong module path
This update allows proper use of go get github.com/PaloAltoNetworks/pango/v2@v2.0.0-rc6 and other v2+ versions.
###How Has This Been Tested?
• Verified the build with go build ./... — no new build errors introduced; all errors match those present on the main branch
• Verified tests with go test ./... — confirmed no additional test failures introduced
• Verified example/main.go builds and runs correctly when imported using the updated /v2 path and a local module replace directive
Environment: go1.23.1 darwin/arm64
###Screenshots (if appropriate)
N/A
###Types of changes
• Bug fix (non-breaking change which fixes an issue)
• New feature (non-breaking change which adds functionality)
• Breaking change (fix or feature that would cause existing functionality to change)
###Checklist
• I have updated the documentation accordingly.
Yes – updated and verified example/main.go usage example.
• I have read the CONTRIBUTING document.
• I have added tests to cover my changes if appropriate.
N/A – no functional logic changes.
• All new and existing tests passed.
No new test failures introduced; build errors present on main persist unchanged.