25 lines
		
	
	
		
			492 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			492 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
| # note: call scripts from /scripts
 | |
| GOCMD=GO111MODULE=on go
 | |
| LOCALCMD=/usr/local
 | |
| 
 | |
| 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.21.0; \
 | |
| 	}
 | |
| 
 | |
| lint: linters-install
 | |
| 	 $(LOCALCMD)/bin/golangci-lint run
 | |
| 
 | |
| fmt:
 | |
| 	$(GOCMD) fmt ./...
 | |
| 
 | |
| vet:
 | |
| 	$(GOCMD) vet ./.
 | |
| 
 | |
| test:
 | |
| 	$(GOCMD) test -cover -race ./...
 | |
| 
 | |
| bench:
 | |
| 	$(GOCMD) test -bench=. -benchmem ./...
 |