Created
December 10, 2019 20:58
-
-
Save dmytro-anokhin/9796beca4ac5a98dc9a89e338461f7b2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
extension NetworkingA: UserNetworkService { | |
func loadUsers(withURL url: URL, completion: @escaping (Result<[User], Error>) -> Void) { | |
loadJSON(withURL: url, type: [User].self, completion: completion) | |
} | |
} | |
extension NetworkingB: UserNetworkService { | |
func loadUsers(withURL url: URL, completion: @escaping (Result<[User], Error>) -> Void) { | |
load(url, type: [User].self, completion: completion) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment