github.com/unionj-cloud/go-doudou/v2@v2.3.5/toolkit/memberlist/Makefile (about)

     1  SHELL := bash
     2  
     3  GOFILES ?= $(shell go list ./... | grep -v /vendor/)
     4  
     5  default: test
     6  
     7  test: vet subnet
     8  	go test ./...
     9  
    10  integ: subnet
    11  	INTEG_TESTS=yes go test ./...
    12  
    13  subnet:
    14  	./test/setup_subnet.sh
    15  
    16  cov:
    17  	go test ./... -coverprofile=coverage.out
    18  	go tool cover -html=coverage.out
    19  
    20  format:
    21  	@echo "--> Running go fmt"
    22  	@go fmt $(GOFILES)
    23  
    24  vet:
    25  	@echo "--> Running go vet"
    26  	@go vet -tags '$(GOTAGS)' $(GOFILES); if [ $$? -eq 1 ]; then \
    27  		echo ""; \
    28  		echo "Vet found suspicious constructs. Please check the reported constructs"; \
    29  		echo "and fix them if necessary before submitting the code for review."; \
    30  		exit 1; \
    31  	fi
    32  
    33  .PHONY: default test integ subnet cov format vet