-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (37 loc) · 1 KB
/
Makefile
File metadata and controls
49 lines (37 loc) · 1 KB
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
build:
go build -o mydocs ./cmd/mydocs
run:
go run ./cmd/mydocs
test:
go test ./...
bench:
go test -bench=. ./...
lint:
golangci-lint run
fmt:
gofmt -s -w .
vet:
go vet ./...
clean:
rm -f mydocs
install:
go install ./cmd/mydocs
install-global:
sudo cp mydocs /usr/local/bin/mydocs
sudo chmod +x /usr/local/bin/mydocs
uninstall:
rm -f $(GOPATH)/bin/mydocs /usr/local/bin/mydocs
help:
@echo "Available commands:"
@echo " build Build the binary"
@echo " run Run the application"
@echo " test Run tests"
@echo " bench Run benchmarks"
@echo " lint Run linter"
@echo " fmt Format code"
@echo " vet Run go vet"
@echo " clean Remove built binary"
@echo " install Install to GOPATH/bin (requires Go env)"
@echo " install-global Install to /usr/local/bin (system-wide)"
@echo " uninstall Remove installed binary"
.PHONY: build run test bench lint fmt vet clean install install-global uninstall help