Commit 4ca8f21e authored by jiangpeng's avatar jiangpeng Committed by vipwzw

fmt && lint

parent c1fe3337
...@@ -5,30 +5,26 @@ set -o pipefail ...@@ -5,30 +5,26 @@ set -o pipefail
#set -o verbose #set -o verbose
#set -o xtrace #set -o xtrace
sedfix="" sedfix=""
if [ "$(uname)" == "Darwin" ]; then if [ "$(uname)" == "Darwin" ]; then
sedfix=".bak" sedfix=".bak"
fi fi
AutoTestMain="../../vendor/github.com/33cn/chain33/cmd/autotest/main.go" AutoTestMain="../../vendor/github.com/33cn/chain33/cmd/autotest/main.go"
ImportPlugin='"github.com/33cn/plugin/plugin"' ImportPlugin="\"github.com/33cn/plugin/plugin\""
function build_auto_test() { function build_auto_test() {
rm -rf *.go
cp "${AutoTestMain}" ./ cp "${AutoTestMain}" ./
sed -i $sedfix '/^package/a import _ '${ImportPlugin}'' *.go sed -i $sedfix "/^package/a import _ ${ImportPlugin}" main.go
go build -v -i -o autotest go build -v -i -o autotest
} }
function clean_auto_test() { function clean_auto_test() {
rm -rf *.go rm -f ../autotest/main.go
} }
trap "clean_auto_test" INT TERM EXIT trap "clean_auto_test" INT TERM EXIT
build_auto_test build_auto_test
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
package autotest package autotest
import ( import (
. "github.com/33cn/chain33/cmd/autotest/types"
"strconv" "strconv"
. "github.com/33cn/chain33/cmd/autotest/types"
) )
//pub2priv case //pub2priv case
......
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
package autotest package autotest
import ( import (
. "github.com/33cn/chain33/cmd/autotest/types"
"strconv" "strconv"
. "github.com/33cn/chain33/cmd/autotest/types"
) )
//pub2priv case //pub2priv case
......
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
package autotest package autotest
import ( import (
. "github.com/33cn/chain33/cmd/autotest/types"
"strconv" "strconv"
. "github.com/33cn/chain33/cmd/autotest/types"
) )
//pub2priv case //pub2priv case
......
...@@ -4,10 +4,11 @@ ...@@ -4,10 +4,11 @@
package autotest package autotest
import ( import (
"reflect"
. "github.com/33cn/chain33/cmd/autotest/types" . "github.com/33cn/chain33/cmd/autotest/types"
. "github.com/33cn/chain33/system/dapp/coins/autotest" . "github.com/33cn/chain33/system/dapp/coins/autotest"
. "github.com/33cn/plugin/plugin/dapp/token/autotest" . "github.com/33cn/plugin/plugin/dapp/token/autotest"
"reflect"
) )
type privacyAutoTest struct { type privacyAutoTest struct {
......
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
package autotest package autotest
import ( import (
. "github.com/33cn/chain33/cmd/autotest/types"
"strconv" "strconv"
. "github.com/33cn/chain33/cmd/autotest/types"
) )
//pub2priv case //pub2priv case
......
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
package autotest package autotest
import ( import (
"reflect"
. "github.com/33cn/chain33/cmd/autotest/types" . "github.com/33cn/chain33/cmd/autotest/types"
. "github.com/33cn/chain33/system/dapp/coins/autotest" . "github.com/33cn/chain33/system/dapp/coins/autotest"
"reflect"
) )
type tokenAutoTest struct { type tokenAutoTest struct {
......
...@@ -6,8 +6,9 @@ package autotest ...@@ -6,8 +6,9 @@ package autotest
import ( import (
"errors" "errors"
"fmt" "fmt"
. "github.com/33cn/chain33/cmd/autotest/types"
"strconv" "strconv"
. "github.com/33cn/chain33/cmd/autotest/types"
) )
type BuyCase struct { type BuyCase struct {
......
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
package autotest package autotest
import ( import (
. "github.com/33cn/chain33/cmd/autotest/types"
"strconv" "strconv"
. "github.com/33cn/chain33/cmd/autotest/types"
) )
type SellCase struct { type SellCase struct {
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
package autotest package autotest
import ( import (
"reflect"
. "github.com/33cn/chain33/cmd/autotest/types" . "github.com/33cn/chain33/cmd/autotest/types"
. "github.com/33cn/chain33/system/dapp/coins/autotest" . "github.com/33cn/chain33/system/dapp/coins/autotest"
. "github.com/33cn/plugin/plugin/dapp/token/autotest" . "github.com/33cn/plugin/plugin/dapp/token/autotest"
"reflect"
) )
type tradeAutoTest struct { type tradeAutoTest struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment