Browse Source

feature: add makefile

pull/251/head
Rennbon 4 years ago
parent
commit
a754a0cabc
  1. 23
      Makefile
  2. 2
      dtmsvr/storage/trans.go

23
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

2
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
}

Loading…
Cancel
Save