Last active
October 6, 2015 00:49
-
-
Save prashantv/fa777aa4b057e393fb8d to your computer and use it in GitHub Desktop.
Migrate TChannel clients from the old import (github.com/uber/tchannel/golang) to the new import (github.com/uber/tchannel-go)
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
# Get the new tchannel-go repository. | |
go get -f -u github.com/uber/tchannel-go | |
# Delete the old tchannel repository to avoid goimports importing it. | |
rm -rf ${GOPATH}/src/github.com/uber/tchannel | |
# Rewrite all imports to use the new repository. | |
for f in `grep --include '*.go' --exclude-dir "Godeps" --exclude-dir "thrift-binaries" --exclude-dir "build_test" "tchannel/golang" -R -l .` | |
do | |
echo "Rewriting $f" | |
sed -i '' -e 's/github.com\/uber\/tchannel\/golang/github.com\/uber\/tchannel-go/g' $f | |
gofmt -w $f | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
And this should be run at the root level of your Go service/repo.