-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
40 lines (29 loc) · 1.07 KB
/
justfile
File metadata and controls
40 lines (29 loc) · 1.07 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
all: tidy format test-color lint gen format-html
tidy:
go mod tidy
test:
go test -race -failfast ./...
test-color:
# go install github.com/haunt98/go-test-color@latest
go-test-color -race -failfast ./...
coverage:
go test -coverprofile=coverage.out ./...
coverage-cli: coverage
go tool cover -func=coverage.out
coverage-html: coverage
go tool cover -html=coverage.out
lint:
golangci-lint run --fix ./...
modernize -fix -test ./...
format:
# go install github.com/haunt98/gofimports/cmd/gofimports@latest
# go install mvdan.cc/gofumpt@latest
gofimports -w --company github.com/make-go-great,github.com/haunt98 .
gofumpt -w -extra .
gen:
go run .
format-html:
bunx prettier --log-level error --write ./templates/*.html ./docs/*.html
bunx prettier --log-level error --print-width 120 --tab-width 4 --prose-wrap always --write ./posts
upstream:
wcurl --curl-options="--clobber --netrc" https://raw.githubusercontent.com/sindresorhus/github-markdown-css/main/github-markdown.css --output ./templates/github-markdown.css