Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
perf: replace fmt.Sprintf with fmt.Fprintf
  • Loading branch information
itsllyaz committed Apr 6, 2026
commit f5df1132a00af9b2886dac4db3aa7048219cf7eb
4 changes: 2 additions & 2 deletions route.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ func (r RouteInfo) Reverse(pathValues ...any) string {
// in case of `*` wildcard or `:` (unescaped colon) param we replace everything till next slash or end of path
for ; i < l && r.Path[i] != '/'; i++ {
}
uri.WriteString(fmt.Sprintf("%v", pathValues[n]))
n++
fmt.Fprintf(uri, "%v", pathValues[n])
n++
Comment thread
aldas marked this conversation as resolved.
Outdated
}
if i < l {
uri.WriteByte(r.Path[i])
Expand Down