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

Rename Go module to allow installing with go install #734

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ben-krieger
Copy link
Contributor

@ben-krieger ben-krieger commented Jan 14, 2025

Goal: Install rpc-go with go install github.com/open-amt-cloud-toolkit/rpc-go/v2/cmd/rpc@latest.

Steps taken:

  • Modify module name in go.mod to github.com/open-amt-cloud-toolkit/rpc-go/v2 to reflect location and proper versioning (required by Go toolchain)
  • Move contents of cmd to cmd/rpc for proper executable naming
  • Update self-imports with find . -name '*.go' -exec sed -i 's|"rpc/|"github.com/open-amt-cloud-toolkit/rpc-go/v2/|' '{}' \;
  • Fix import grouping with find . -name '*.go' -exec goimports -local github.com/open-amt-cloud-toolkit -w '{}' \;
  • Ensure proper formatting with find . -name '*.go' -exec gofmt -s -w '{}' \;
  • Update README and Makefile with new cmd/rpc path

@ben-krieger ben-krieger force-pushed the rename-for-go-install branch from 87aee84 to 5f0422e Compare January 15, 2025 17:48
@ben-krieger ben-krieger force-pushed the rename-for-go-install branch from 5f0422e to 2f0a5c9 Compare January 15, 2025 17:52
@rsdmike
Copy link
Member

rsdmike commented Jan 23, 2025

This looks good -- I was able to get it to work in my own fork with go install github.com/rsdmike/rpc-go/v2/cmd/rpc@v2 . After giving it some thought, I'm thinking we can forego the breaking change indicator ! as that would make it v3 and be confusing when there really isn't a CLI/command change, but keep as a feat:. So if you could update that I'll go ahead and approve and we can tweak anything we need to if it doesn't work after its merged in. We'll likely need to make some changes in the documentation given the path change for cmd/rpc tho.

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