Skip to content

Add a envOrDefault helper #829

@nicolasbernard

Description

@nicolasbernard

Feature Request

For a new project we use a bench of {{ if env "TIMEOUT_CONNECT" }}{{ env "TIMEOUT_CONNECT" }}{{ else }}5s{{ end }} which is a bit verbose and redundant.

It would be very conveniant to use a syntax like {{envOrDefault "TIMEOUT_CONNECT" "5s"}}

It should be trivial to implement, I can make a pull request if you are ok with it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions