Skip to content

Provide default value for configuration  #21

Description

@radityagumay

As we have seen in the example, the initialization of Courier took few configurations. Since most of them are a default configuration. would be better if we create a bean in the configuration class itself, and the caller is able to mutate as per need. doing this would less overhead for setup the configuration

Example:

data class FooConfiguration(
    val arg1: String,
    val arg2: String,
    val arg3: String
) {

    fun default(): FooConfiguration {
        return FooConfiguration(/*args*/, /*args*/, /*args*/)
    }
}

// client side
val foo = FooConfiguration.default().copy(arg1 = "magic")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions