Skip to content

Instantly share code, notes, and snippets.

@hadilq
Created January 10, 2021 23:00
Show Gist options
  • Select an option

  • Save hadilq/547cc079c35976207850e754a25db77d to your computer and use it in GitHub Desktop.

Select an option

Save hadilq/547cc079c35976207850e754a25db77d to your computer and use it in GitHub Desktop.

Revisions

  1. hadilq created this gist Jan 10, 2021.
    3 changes: 3 additions & 0 deletions GeneralResult.kt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    sealed class Result<T>
    data class Success<T>(val value: T): Result<T>()
    data class Failure<T>(val errorMessage: String): Result<T>()