improve check for offline rules (#1013)

* improve check for offline rules

* bug fixes

* update dependencies

* fix error wrap

* fix offline check

* improve readability
This commit is contained in:
UUBulb
2025-03-02 15:37:21 +08:00
committed by GitHub
parent 655d034f79
commit 5c8cc75523
13 changed files with 198 additions and 167 deletions

View File

@@ -149,3 +149,19 @@ func ConvertSeq2[KIn, VIn, KOut, VOut any](seq iter.Seq2[KIn, VIn], f func(KIn,
}
}
}
type WrapError struct {
err, errIn error
}
func NewWrapError(err, errIn error) error {
return &WrapError{err, errIn}
}
func (e *WrapError) Error() string {
return e.err.Error()
}
func (e *WrapError) Unwrap() error {
return e.errIn
}