Improved API

This commit is contained in:
2024-03-16 15:22:47 +01:00
parent d6de510d6e
commit f728e19976
10 changed files with 232 additions and 121 deletions

View File

@ -6,6 +6,7 @@ import "net/http"
// empty methods to better understand memory usage in benchmarks.
type NullResponse struct{}
func (r *NullResponse) Header() http.Header { return nil }
func (r *NullResponse) Write([]byte) (int, error) { return 0, nil }
func (r *NullResponse) WriteHeader(int) {}
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) {}