vendor/github.com/spf13/cast/Makefile
changeset 251 1c52a0eeb952
parent 242 2a9ec03fe5a1
--- a/vendor/github.com/spf13/cast/Makefile	Wed Sep 18 19:17:42 2019 +0200
+++ b/vendor/github.com/spf13/cast/Makefile	Sun Feb 16 18:54:01 2020 +0100
@@ -1,4 +1,4 @@
-# A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
+GOVERSION := $(shell go version | cut -d ' ' -f 3 | cut -d '.' -f 2)
 
 .PHONY: check fmt lint test test-race vet test-cover-html help
 .DEFAULT_GOAL := help
@@ -12,11 +12,13 @@
 	go test -race ./...
 
 fmt: ## Run gofmt linter
+ifeq "$(GOVERSION)" "12"
 	@for d in `go list` ; do \
 		if [ "`gofmt -l -s $$GOPATH/src/$$d | tee /dev/stderr`" ]; then \
 			echo "^ improperly formatted go files" && echo && exit 1; \
 		fi \
 	done
+endif
 
 lint: ## Run golint linter
 	@for d in `go list` ; do \