-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename wire_gen file and add makefile
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.PHONY: test lint cover mock_wire mock_gen | ||
|
||
test: | ||
go test ./... | ||
|
||
lint: | ||
golangci-lint run | ||
|
||
cover: | ||
go test -coverprofile=cover.out -coverpkg=./... ./... | ||
go tool cover -html=cover.out -o cover.html | ||
open cover.html | ||
|
||
mock_wire: | ||
@echo "Running wire for component mocks..." | ||
@go run -mod=mod github.com/google/wire/cmd/wire opencsg.com/csghub-server/component | ||
@if [ $$? -eq 0 ]; then \ | ||
echo "Renaming wire_gen.go to wire_gen_test.go..."; \ | ||
mv component/wire_gen.go component/wire_gen_test.go; \ | ||
else \ | ||
echo "Wire failed, skipping renaming."; \ | ||
fi | ||
|
||
mock_gen: | ||
mockery |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters