Skip to content

Commit

Permalink
Merge pull request #350 from stephenafamo/fix/add-unrwap-to-response-…
Browse files Browse the repository at this point in the history
…writer

Add Unwrap method to ClientStateResponseWriter
  • Loading branch information
aarondl committed Nov 8, 2023
2 parents ccfe4d1 + 60e1e59 commit 80cb1b8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,11 @@ func (c *ClientStateResponseWriter) UnderlyingResponseWriter() http.ResponseWrit
return c.ResponseWriter
}

// Unwrap is used by http.ResponseController in Go 1.20
func (c *ClientStateResponseWriter) Unwrap() http.ResponseWriter {
return c.ResponseWriter
}

func (c *ClientStateResponseWriter) putClientState() error {
if c.hasWritten {
panic("should not call putClientState twice")
Expand Down

0 comments on commit 80cb1b8

Please sign in to comment.