18 lines
293 B
Go
18 lines
293 B
Go
package handler
|
|
|
|
// NullHandler does nothing, it discards anything.
|
|
type NullHandler struct {
|
|
}
|
|
|
|
func NewNullHandler() (*NullHandler, error) {
|
|
return new(NullHandler), nil
|
|
}
|
|
|
|
func (h *NullHandler) Write(b []byte) (n int, err error) {
|
|
return len(b), nil
|
|
}
|
|
|
|
func (h *NullHandler) Close() {
|
|
|
|
}
|