Skip to content

Commit

Permalink
Add missing ConfligLoader.loadConfigOrThrow overload (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
Virtlink authored Jun 20, 2021
1 parent 486bf7a commit c829060
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ class ConfigLoader constructor(
@JvmName("loadConfigOrThrowFromFiles")
inline fun <reified A : Any> loadConfigOrThrow(files: List<File>): A = loadConfig<A>(files).returnOrThrow()

fun <A : Any> loadConfigOrThrow(klass: KClass<A>, inputs: List<ConfigSource>): A =
loadConfig(klass, inputs).returnOrThrow()

@JvmName("loadNodeOrThrowFromFiles")
fun loadNodeOrThrow(files: List<File>): Node =
ConfigSource.fromFiles(files.toList()).flatMap { loadNode(it) }.returnOrThrow()
Expand Down

0 comments on commit c829060

Please sign in to comment.