mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-06-30 08:53:05 +00:00
little refactor
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user