Created
November 28, 2024 12:52
-
-
Save romiras/bfa13775989628909d29264e5dd26509 to your computer and use it in GitHub Desktop.
Snippets to prepare new Golang repository from template in MacOS
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
# for consumer | |
sed -i '' -e 's/internal\/my-consumer/internal/g' * | |
# for REST API | |
grep -ilr 'internal\/' internal/* | xargs -I@ sed -i '' 's/internal\/my-api/internal/g' @ | |
grep -ilr 'internal\/' cmd/* | xargs -I@ sed -i '' 's/internal\/my-api/internal/g' @ | |
mv internal/my-api/* internal/ | |
mv cmd/my-api/* cmd/ | |
rm -r cmd/my-api/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment