1
0
Fork 0
forked from forgejo/forgejo

Reduce some allocations in type conversion (#26772)

This commit is contained in:
Chongyi Zheng 2023-08-28 12:43:16 -04:00 committed by GitHub
parent 4803766f7a
commit ac2f8c9ac6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -90,7 +90,7 @@ func (b *EventWriterBaseImpl) Run(ctx context.Context) {
if exprRegexp != nil {
fileLineCaller := fmt.Sprintf("%s:%d:%s", event.Origin.Filename, event.Origin.Line, event.Origin.Caller)
matched := exprRegexp.Match([]byte(fileLineCaller)) || exprRegexp.Match([]byte(event.Origin.MsgSimpleText))
matched := exprRegexp.MatchString(fileLineCaller) || exprRegexp.MatchString(event.Origin.MsgSimpleText)
if !matched {
continue
}