-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (47 loc) · 1.13 KB
/
Makefile
File metadata and controls
57 lines (47 loc) · 1.13 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
50
51
52
53
54
55
56
57
# Makefile for MemoryStore
.PHONY: all build clean test bench lint fmt vet help
# Default target
all: clean fmt vet lint test build
# Build the project
build:
@echo "Building MemoryStore..."
go build -o memory_store
# Run tests with race detection
test:
@echo "Running tests..."
go test -race -cover ./...
# Run benchmarks
bench:
@echo "Running benchmarks..."
go test -bench=. ./...
# Run linter
lint:
@echo "Running linter..."
golangci-lint run ./...
# Format code
fmt:
@echo "Formatting code..."
go fmt ./...
# Vetting code
vet:
@echo "Vetting code..."
go vet ./...
# Clean build artifacts
clean:
@echo "Cleaning up..."
go clean
rm -f memory_store
# Show help
help:
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@echo " all Run clean, fmt, vet, lint, test, and build"
@echo " build Build the project"
@echo " test Run tests with race detector"
@echo " bench Run benchmarks"
@echo " lint Run linter (golangci-lint)"
@echo " fmt Format code (go fmt)"
@echo " vet Vet code (go vet)"
@echo " clean Remove build artifacts"
@echo " help Show this help message"