计轴rssp 集成
This commit is contained in:
parent
8b25469d6e
commit
953bab8063
|
@ -18,6 +18,10 @@ func NewOkResult[T any](val T) Result[T] {
|
|||
return Result[T]{Val: val, Err: nil}
|
||||
}
|
||||
|
||||
func NewResult[T any](val T, err error) Result[T] {
|
||||
return Result[T]{Val: val, Err: err}
|
||||
}
|
||||
|
||||
// 新建一个错误结果
|
||||
func NewErrResult(err error) Result[EmptyType] {
|
||||
return Result[EmptyType]{Val: struct{}{}, Err: err}
|
||||
|
|
Loading…
Reference in New Issue