💯Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
GOCMD=GO111MODULE=on go
|
|
|
|
|
|
|
|
linters-install:
|
|
|
|
@golangci-lint --version >/dev/null 2>&1 || { \
|
|
|
|
echo "installing linting tools..."; \
|
|
|
|
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.41.1; \
|
|
|
|
}
|
|
|
|
|
|
|
|
lint: linters-install
|
|
|
|
golangci-lint run
|
|
|
|
|
|
|
|
test:
|
|
|
|
$(GOCMD) test -cover -race ./...
|
|
|
|
|
|
|
|
bench:
|
|
|
|
$(GOCMD) test -bench=. -benchmem ./...
|
|
|
|
|
|
|
|
.PHONY: test lint linters-install
|