kilt/rename.sh

6 lines
195 B
Bash
Raw Permalink Normal View History

2024-12-15 14:07:44 +01:00
#!/usr/bin/env bash
#
go mod edit -module "${2}"
find . -type f -name '*.go' -exec sed -i -e "s,\"${1}/,\"${2}/,g" {} \;
find . -type f -name '*.go' -exec sed -i -e "s,\"${1}\",\"${2}\",g" {} \;