Skip to content

fix: add /v2 module path for Go v2 compatibility#127

Open
mrhinton101 wants to merge 12 commits intoPaloAltoNetworks:mainfrom
mrhinton101:fix-module-path-v2
Open

fix: add /v2 module path for Go v2 compatibility#127
mrhinton101 wants to merge 12 commits intoPaloAltoNetworks:mainfrom
mrhinton101:fix-module-path-v2

Conversation

@mrhinton101
Copy link

###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.

@mrhinton101
Copy link
Author

Ready for Review

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.

1 participant