Skip to content

Instantly share code, notes, and snippets.

@CDRussell
Last active March 31, 2018 00:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CDRussell/57433765fd195ef08c3f82ced64fee85 to your computer and use it in GitHub Desktop.
Save CDRussell/57433765fd195ef08c3f82ced64fee85 to your computer and use it in GitHub Desktop.
val result = parse(url)
when (result) {
is ParseResult.ParsedData -> analyzeMimeType(result.mimeType)
is ParseResult.Error -> log(result.errorMessage)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment