Skip to content

Commit

Permalink
Merge pull request #711 from vlovgr/config-value-missing-string
Browse files Browse the repository at this point in the history
Add ConfigValue.missing(String)
  • Loading branch information
vlovgr authored Oct 23, 2023
2 parents 4b8dabb + 1da499b commit a0c1b81
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/core/shared/src/main/scala/ciris/ConfigValue.scala
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,12 @@ object ConfigValue {
final def missing[A](key: ConfigKey): ConfigValue[Effect, A] =
ConfigValue.failed(ConfigError.Missing(key))

/**
* Alias for `ConfigValue.missing(ConfigKey(description))`.
*/
final def missing[A](description: => String): ConfigValue[Effect, A] =
ConfigValue.missing(ConfigKey(description))

private[ciris] final def pure[F[_], A](entry: ConfigEntry[A]): ConfigValue[F, A] =
new ConfigValue[F, A] {
override final def to[G[x] >: F[x]](implicit G: Async[G]): Resource[G, ConfigEntry[A]] =
Expand Down

0 comments on commit a0c1b81

Please sign in to comment.