little refactor

This commit is contained in:
Fangliding
2026-02-05 20:25:50 +08:00
parent 0a1b5bfb51
commit dee64ef240
4 changed files with 78 additions and 8 deletions
+8
View File
@@ -56,6 +56,10 @@ type readError struct {
error
}
func NewReadError(err error) error {
return readError{err}
}
func (e readError) Error() string {
return e.error.Error()
}
@@ -74,6 +78,10 @@ type writeError struct {
error
}
func NewWriteError(err error) error {
return writeError{err}
}
func (e writeError) Error() string {
return e.error.Error()
}