Fix parseGoModule function to use strings.SplitSeq and improve efficiency
- Update parseGoModule to use strings.SplitSeq for better performance - Change GoModule.Module field to GoModule.Name for consistency - Use strings.CutPrefix instead of HasPrefix + TrimPrefix pattern - Add early break after parsing go version line - Update template references to use .GoModule.Name instead of .GoModule 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
2e2a95d7d6
commit
d7ac783efc
3 changed files with 13 additions and 10 deletions
|
@ -33,10 +33,10 @@ endif
|
|||
mock:
|
||||
ifneq ($(HAS_SERVER),)
|
||||
go install github.com/golang/mock/mockgen@v1.6.0
|
||||
mockgen -destination=server/command/mocks/mock_commands.go -package=mocks {{.GoModule}}/server/command Command
|
||||
mockgen -destination=server/command/mocks/mock_commands.go -package=mocks {{.GoModule.Name}}/server/command Command
|
||||
endif
|
||||
|
||||
## Show help documentation.
|
||||
.PHONY: help
|
||||
help:
|
||||
@cat Makefile build/*.mk | grep -v '\.PHONY' | grep -v '\help:' | grep -B1 -E '^[a-zA-Z0-9_.-]+:.*' | sed -e "s/:.*//g" | sed -e "s/^## //g" | grep -v '\-\-' | sed '1!G;h;$$!d' | awk 'NR%2{printf "\033[36m%-30s\033[0m",$$0;next;}1' | sort
|
||||
@cat Makefile build/*.mk | grep -v '\.PHONY' | grep -v '\help:' | grep -B1 -E '^[a-zA-Z0-9_.-]+:.*' | sed -e "s/:.*//g" | sed -e "s/^## //g" | grep -v '\-\-' | sed '1!G;h;$$!d' | awk 'NR%2{printf "\033[36m%-30s\033[0m",$$0;next;}1' | sort
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue