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

C2P Go module is not able to be imported or used with go get #18

Open
jpower432 opened this issue Jan 24, 2025 · 0 comments · May be fixed by #14
Open

C2P Go module is not able to be imported or used with go get #18

jpower432 opened this issue Jan 24, 2025 · 0 comments · May be fixed by #14
Assignees
Labels
bug Something isn't working v1 Related to Go Module v1 v2 Relates to Go module v2

Comments

@jpower432
Copy link
Member

Describe the bug

When trying to import the compliance-to-policy-go module (v1 and v2) errors occurr due to colon characters in the pkg/testdata path

I believe the error being thrown here - https://pkg.go.dev/golang.org/x/[email protected]/module#CheckFilePath

Step to Reproduce

Step 1 - Run Command

go get github.com/oscal-compass/[email protected]

Step 2 - Observe Error

malformed file path "pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-generaterequest.yaml": invalid char ':'

Expected Behavior

Successful retrieval of Go module

Potential Solutions

  • Add an empty Go mod in pkg/testdata to keep it from being imported with the c2p Go module
  • Rename all of the manifests with : characters
@jpower432 jpower432 added bug Something isn't working v2 Relates to Go module v2 v1 Related to Go Module v1 labels Jan 24, 2025
@jpower432 jpower432 self-assigned this Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v1 Related to Go Module v1 v2 Relates to Go module v2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant