Skip to content

Commit b446888

Browse files
authored
Reduce allocation in AutoFormat (#3652)
1 parent a838dfb commit b446888

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

req.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type RangeSet struct {
2828

2929
//go:generate ifacemaker --file req.go --struct DefaultReq --iface Req --pkg fiber --output req_interface_gen.go --not-exported true --iface-comment "Req is an interface for request-related Ctx methods."
3030
type DefaultReq struct {
31-
c Ctx
31+
c *DefaultCtx
3232
}
3333

3434
// Accepts checks if the specified extensions or content types are acceptable.

res.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ type ResFmt struct {
120120

121121
//go:generate ifacemaker --file res.go --struct DefaultRes --iface Res --pkg fiber --output res_interface_gen.go --not-exported true --iface-comment "Res is an interface for response-related Ctx methods."
122122
type DefaultRes struct {
123-
c Ctx
123+
c *DefaultCtx
124124
}
125125

126126
// App returns the *App reference to the instance of the Fiber application

0 commit comments

Comments
 (0)