Skip to content

Instantly share code, notes, and snippets.

@CDRussell
Last active March 30, 2018 23:42
Show Gist options
  • Select an option

  • Save CDRussell/600bf6f9eeeb2ce30401dfe6922a937e to your computer and use it in GitHub Desktop.

Select an option

Save CDRussell/600bf6f9eeeb2ce30401dfe6922a937e to your computer and use it in GitHub Desktop.
val result = parse(url)
if(result.errorMessage != null) {
// error occurred - log error message etc...
} else {
// happy path - use the data. But result.data is nullable 🙄
val mimeType = result.data!!.mimeType
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment