In generate code, regexp.MustCompile in function body
Open
- Dominant language
- Go
- Stars
- 108
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the feature
In the generated code, `regexp.MustCompile` is being called within the function. This leads to unnecessary recompilation on each invocation and affects performance. Maybe defining the regex at the package level (outside the function) to compile it only once.
https://github.com/go-gorm/cli/blob/a94e55eadd415ac1e47f05676d76469ab6abbcbc/examples/output/query.go#L131
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.