Skip to content

Commit 64178e1

Browse files
committed
Add Makefile
1 parent cafe368 commit 64178e1

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

kadai3-2/hioki-daichi/Makefile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
GOCMD=go
2+
GOBUILD=$(GOCMD) build
3+
GOCLEAN=$(GOCMD) clean
4+
GOTEST=$(GOCMD) test
5+
GOTOOL=$(GOCMD) tool
6+
GODOCCMD=godoc
7+
GODOCPORT=6060
8+
BINARY_NAME=parallel-download
9+
10+
all: test build
11+
build:
12+
dep ensure
13+
$(GOBUILD) -o $(BINARY_NAME) -v
14+
test:
15+
$(GOTEST) ./...
16+
cov:
17+
$(GOTEST) ./... -race -coverprofile=coverage/c.out -covermode=atomic
18+
$(GOTOOL) cover -html=coverage/c.out -o coverage/index.html
19+
open coverage/index.html
20+
clean:
21+
$(GOCLEAN)
22+
rm -f $(BINARY_NAME)
23+
doc:
24+
(sleep 1; open http://localhost:$(GODOCPORT)/pkg/github.com/gopherdojo/dojo3) &
25+
$(GODOCCMD) -http ":$(GODOCPORT)"

0 commit comments

Comments
 (0)