sksamuel / hoplite

A boilerplate-free Kotlin config library for loading configuration files as data classes
Apache License 2.0
923 stars 74 forks source link

Fix loadConfigOrThrow example in README to have a leading forward slash #400

Closed Deeds67 closed 9 months ago

Deeds67 commented 9 months ago

When using version 2.7.5 of hoplite-hocon, it seems like a leading forward slash is required before the filename.

i.e this does not work for me:

    ConfigLoader().loadConfigOrThrow("application.conf")
Exception in thread "main" com.sksamuel.hoplite.ConfigException: Error loading config because:
    Could not find application.conf

but this works:

    ConfigLoader().loadConfigOrThrow("/application.conf")

I see all of the other examples in the README have a leading forward slash.

sksamuel commented 9 months ago

This is a standard java thing, good to clarify the docs.