Improve: delete useless code and code coverage is now 100%
This commit is contained in:
@ -1,18 +1,3 @@
|
||||
package observable
|
||||
|
||||
import (
|
||||
"errors"
|
||||
)
|
||||
|
||||
type Iterable <-chan interface{}
|
||||
|
||||
func NewIterable(any interface{}) (Iterable, error) {
|
||||
switch any := any.(type) {
|
||||
case chan interface{}:
|
||||
return Iterable(any), nil
|
||||
case <-chan interface{}:
|
||||
return Iterable(any), nil
|
||||
default:
|
||||
return nil, errors.New("type error")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user