uniugm/admin/lib/xlog/handler/handler_null.go

18 lines
293 B
Go
Raw Normal View History

2025-04-18 17:17:23 +08:00
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() {
}