forked from opusb/clash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve: delete useless code and code coverage is now 100%
- Loading branch information
Dreamacro
committed
Jul 12, 2018
1 parent
283e4e1
commit 39b4551
Showing
4 changed files
with
22 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.