Skip to content

Support variable interpolation in set #552

@mitar

Description

@mitar

I have example like:

type SAMLProvider struct {
	MetadataURL string `default:"${defaultMetadataURL}" env:"METADATA_URL" help:"${provider}'s metadata URL." placeholder:"URL" required:""`
	EntityID    string `                                env:"ENTITY_ID"    help:"${provider}'s entity ID."    required:""`
}

type Providers struct {
	MockSAML SAMLProvider `embed:"" envprefix:"MOCK_" prefix:"mock." set:"provider=MockSAML" set:"defaultMetadataURL=${defaultMockSAMLMetadataURL}"`
}

But it does not work because set does not interpolate its value. I think this could be a nice feature which would help with reusability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions