mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 15:09:42 +00:00
* added audit manager * Basic database DOA setup * Added base config file * added sqlite support and creation of schema * added basic tests and config entry * corrected issues of database is disabled * fixed path for test * WIP * Added tests fixed config checking * reverted files back to upstream * reverted go.mod files * no more test test test * removed local testing details for psql * hello * added comments * increased ping to 30 seconds * renamed database table and added additional condition around test * removed database test details * goimport ran on all files * WIP * first attempt at migration * fixes for migration system * Migration system logger interface implemented * fixes to print functions * added write pooling pass * gofmt :D * formatted imports correctly * removed old code * added creation of migration * gofmt * :D Hello * ❌ 🏎️ * maybe one day i will remember to revert go mod files * checked err return condition correctly * first changes for PR feedback * code clean up * protect Connected with RWmutex & event with mutex * : D * we can just pretend like it never happened * MOved migrations back to source directory and added README * readme formatting update * Addd command line override for datadir * use correct var when creating a migration and confirm folder is created * Check if database version is newer than latest migration and also you know make migrations work..... * uses filepath instead of manual path to use correct path seperator * Add connection message and lower timeout * Added support for sslmode for psql * no longer force Close of database instead allow driver to maage * Added closer func to test output * sslmode added to example config
46 lines
1.1 KiB
Makefile
46 lines
1.1 KiB
Makefile
LDFLAGS = -ldflags "-w -s"
|
|
GCTPKG = github.com/thrasher-corp/gocryptotrader
|
|
LINTPKG = github.com/golangci/golangci-lint/cmd/golangci-lint@v1.16.0
|
|
LINTBIN = $(GOPATH)/bin/golangci-lint
|
|
GCTLISTENPORT=9050
|
|
GCTPROFILERLISTENPORT=8085
|
|
|
|
get:
|
|
GO111MODULE=on go get $(GCTPKG)
|
|
|
|
linter:
|
|
GO111MODULE=on go get $(GCTPKG)
|
|
GO111MODULE=on go get $(LINTPKG)
|
|
test -z "$$($(LINTBIN) run --verbose | tee /dev/stderr)"
|
|
|
|
check: linter test
|
|
|
|
test:
|
|
go test -race -coverprofile=coverage.txt -covermode=atomic ./...
|
|
|
|
build:
|
|
GO111MODULE=on go build $(LDFLAGS)
|
|
|
|
install:
|
|
GO111MODULE=on go install $(LDFLAGS)
|
|
|
|
fmt:
|
|
gofmt -l -w -s $(shell find . -type f -name '*.go')
|
|
|
|
update_deps:
|
|
GO111MODULE=on go mod verify
|
|
GO111MODULE=on go mod tidy
|
|
rm -rf vendor
|
|
GO111MODULE=on go mod vendor
|
|
|
|
.PHONY: profile_heap
|
|
profile_heap:
|
|
go tool pprof -http "localhost:$(GCTPROFILERLISTENPORT)" 'http://localhost:$(GCTLISTENPORT)/debug/pprof/heap'
|
|
|
|
.PHONY: profile_cpu
|
|
profile_cpu:
|
|
go tool pprof -http "localhost:$(GCTPROFILERLISTENPORT)" 'http://localhost:$(GCTLISTENPORT)/debug/pprof/profile'
|
|
|
|
db_migrate:
|
|
go run ./cmd/dbmigrate
|