From a754a0cabcd7dc8a6b8b669d634e180c8ba812fa Mon Sep 17 00:00:00 2001 From: Rennbon <343688972@qq.com> Date: Fri, 11 Mar 2022 20:54:07 +0800 Subject: [PATCH] feature: add makefile --- Makefile | 23 +++++++++++++++++++++++ dtmsvr/storage/trans.go | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0096486 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +# dev env https://www.dtm.pub/other/develop.html +all: fmt lint test_all cover_test +.PHONY: all + +fmt: + @gofmt -s -w ./ + +lint: + @golangci-lint run + +.PHONY: test +test: + @go test ./... + +test_all: + TEST_STORE=redis go test ./... + TEST_STORE=boltdb go test ./... + TEST_STORE=mysql go test ./... + TEST_STORE=postgres go test ./... + +cover_test: + ./helper/test-cover.sh + diff --git a/dtmsvr/storage/trans.go b/dtmsvr/storage/trans.go index 789ba0c..4f37122 100644 --- a/dtmsvr/storage/trans.go +++ b/dtmsvr/storage/trans.go @@ -39,7 +39,7 @@ type TransGlobalStore struct { NextCronTime *time.Time `json:"next_cron_time,omitempty"` Owner string `json:"owner,omitempty"` Ext TransGlobalExt `json:"-" gorm:"-"` - ExtData string `json:"ext_data,omitempty"` // storage of ext. a db field to store many values. like Options + ExtData string `json:"ext_data,omitempty"` // storage of ext. a db field to store many values. like Options dtmcli.TransOptions }