Skip to content

Instantly share code, notes, and snippets.

@mecid
Last active June 26, 2019 19:03
Show Gist options
  • Select an option

  • Save mecid/729bae3d0b8e780cfd0df6a76ea51621 to your computer and use it in GitHub Desktop.

Select an option

Save mecid/729bae3d0b8e780cfd0df6a76ea51621 to your computer and use it in GitHub Desktop.
private func fetchRepos(matching query: String) {
githubService
.search(matching: query)
.replaceError(with: [])
.subscribe(on: DispatchQueue.global())
.receive(on: OperationQueue.main)
.sink { repos in print("count:", repos.count) }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment