mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-14 11:23:02 +02:00
21 lines
289 B
Go
21 lines
289 B
Go
|
package core
|
||
|
|
||
|
type (
|
||
|
Result struct {
|
||
|
err <-chan error
|
||
|
data <-chan Value
|
||
|
}
|
||
|
)
|
||
|
|
||
|
func NewResult(err <-chan error, data <-chan Value) *Result {
|
||
|
return &Result{err, data}
|
||
|
}
|
||
|
|
||
|
func (r *Result) Error() <-chan error {
|
||
|
return r.err
|
||
|
}
|
||
|
|
||
|
func (r *Result) Data() <-chan Value {
|
||
|
return r.data
|
||
|
}
|