-
-
Save CypherpunkSamurai/883e0d1bc7ce96c8daab40ee6b7a6da4 to your computer and use it in GitHub Desktop.
go rename modules
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
| OLD_MODULE_NAME="$0" | |
| NEW_MODULE_NAME="$1" | |
| go mod edit -module ${NEW_MODULE_NAME} | |
| -- rename all imported module | |
| find . -type f -name '*.go' \ | |
| -exec sed -i -e 's,{OLD_MODULE_NAME},{NEW_MODULE_NAME},g' {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment