From 034cb3222e7b51a835333facbad5bba9226b815d Mon Sep 17 00:00:00 2001 From: Ming Deng Date: Tue, 6 Oct 2020 11:53:59 +0800 Subject: [PATCH] Add adapter script which is used to replace v1 package with v2 adapter package --- scripts/adapter.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 scripts/adapter.sh diff --git a/scripts/adapter.sh b/scripts/adapter.sh new file mode 100644 index 00000000..ce2d319a --- /dev/null +++ b/scripts/adapter.sh @@ -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' {} \;