1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-21 21:30:54 +00:00

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

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' {} \;