uniugm/admin/lib/xlog/handler/handler_null.go
2025-04-18 17:17:23 +08:00

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() {
}