Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save juliuscanute/3405e5d220905905f96189cec59fc016 to your computer and use it in GitHub Desktop.
Save juliuscanute/3405e5d220905905f96189cec59fc016 to your computer and use it in GitHub Desktop.
Configuration Getter
/*..*/
override fun getConfigInt(userKey: String): Int {
val key = environment + PREFIX + userKey
val storeValue: StoreValue? = store[key]
checkNotNull(storeValue, { "Unable to find the key" })
check(storeValue is StoreValue.IntValue) { "Store value must be Int" }
return storeValue.value
}
/*..*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment