13 lines
475 B
Go
Raw Normal View History

2024-03-22 14:08:24 +00:00
package web_test
2024-03-12 19:35:19 +00:00
import "net/http"
// NullResponse implements the http.ResponseWriter interface with
// empty methods to better understand memory usage in benchmarks.
type NullResponse struct{}
2024-03-16 14:22:47 +00:00
func (r *NullResponse) Header() http.Header { return nil }
func (r *NullResponse) Write([]byte) (int, error) { return 0, nil }
func (r *NullResponse) WriteString(string) (int, error) { return 0, nil }
func (r *NullResponse) WriteHeader(int) {}