File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11packages :
22 github.com/spacemagneto/compressjson :
33 config :
4- all : True
4+ dir : " {{.InterfaceDir}}"
5+ filename : " mocks/mocks.go"
6+ structname : " {{.Mock}}{{.InterfaceName}}"
57 interfaces :
68 Transcoder :
79 config:
Original file line number Diff line number Diff line change 1+ # This Makefile defines common tasks for a Go project, including linting the code,
2+ # running tests, and generating mocks using mockery.
3+
4+ # Target: lint
5+ # Description: Run the Go linter using golangci-lint.
6+ # This checks the code for stylistic issues, potential bugs, and other improvements.
7+ lint : # # Run linter
8+ golangci-lint run
9+
10+ # Target: test
11+ # Description: Run all tests in the project.
12+ # The -v flag makes the test output verbose, showing detailed information about each test.
13+ test : # # Run tests
14+ go test -v ./...
15+
16+ # Target: generate
17+ # Description: Generate code, particularly mocks using mockery.
18+ # If mockery is not installed, this will install it first, and then run go generate.
19+ generate : # # Generate mocks
20+ # Check if mockery is installed. If not, install it.
21+ ifeq (, $(shell which mockery) )
22+ go install github.com/vektra/mockery
23+ endif
24+ # Run go generate to trigger code generation in the project.
25+ mockery
You can’t perform that action at this time.
0 commit comments