Improved API

This commit is contained in:
Eduard Urbach 2024-03-16 15:22:47 +01:00
parent e8f9f4ff95
commit a172cbd45f
Signed by: eduard
GPG key ID: 49226B848C78F6C8
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) {}