Add adapter script which is used to replace v1 package with v2 adapter package

This commit is contained in:
Ming Deng 2020-10-06 11:53:59 +08:00
parent 66804324f2
commit 034cb3222e
1 changed files with 6 additions and 0 deletions

6
scripts/adapter.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/sh
# using pkg/adapter. Usually you want to migrate to V2 smoothly, you could running this script
find ./ -name '*.go' -type f -exec sed -i '' -e 's/github.com\/astaxie\/beego/github.com\/astaxie\/beego\/pkg\/adapter/g' {} \;
find ./ -name '*.go' -type f -exec sed -i '' -e 's/"github.com\/astaxie\/beego\/pkg\/adapter"/beego "github.com\/astaxie\/beego\/pkg\/adapter"/g' {} \;