Blame view

go/src/themaru/vendor/github.com/gin-contrib/multitemplate/Makefile 1.23 KB
476d2547e   김태훈   태마루 시스템 설정 / 업데이트...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
  GOFMT ?= gofmt "-s"
  PACKAGES ?= $(shell go list ./... | grep -v /vendor/)
  GOFILES := $(shell find . -name "*.go" -type f -not -path "./vendor/*")
  
  all: build
  
  install: deps
  	go get -v -t -d ./...
  
  .PHONY: test
  test:
  	go test -v -covermode=count -coverprofile=coverage.out
  
  .PHONY: fmt
  fmt:
  	$(GOFMT) -w $(GOFILES)
  
  .PHONY: fmt-check
  fmt-check:
  	# get all go files and run go fmt on them
  	@diff=$$($(GOFMT) -d $(GOFILES)); \
  	if [ -n "$$diff" ]; then \
  		echo "Please run 'make fmt' and commit the result:"; \
  		echo "$${diff}"; \
  		exit 1; \
  	fi;
  
  vet:
  	go vet $(PACKAGES)
  
  deps:
  	@hash embedmd > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  		go get -u github.com/campoy/embedmd; \
  	fi
  
  embedmd:
  	embedmd -d *.md
  
  .PHONY: lint
  lint:
  	@hash golint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  		go get -u golang.org/x/lint/golint; \
  	fi
  	for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || exit 1; done;
  
  .PHONY: misspell-check
  misspell-check:
  	@hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  		go get -u github.com/client9/misspell/cmd/misspell; \
  	fi
  	misspell -error $(GOFILES)
  
  .PHONY: misspell
  misspell:
  	@hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  		go get -u github.com/client9/misspell/cmd/misspell; \
  	fi
  	misspell -w $(GOFILES)