Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ez/ez.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ type Params[T any] struct {
// things.
// (Currently only affects the yaml decoder)
FlattenAnonymousFields bool

// If enabled, Dials will retain the slice of reported source-values so
// it can render a status page using [github.com/vimeo/go-status-page]
//
// This feature is experimental and go-status-page may generate panics
// while rendering pages.
//
// It is heavily recommended that users of this functionality set
// `statuspage:"-"` tags on any sensitive fields with secrets/credentials, etc.
EnableStatusPage bool
}

// DecoderFactory should return the appropriate [dials.Decoder] based on the config file
Expand Down Expand Up @@ -185,6 +195,7 @@ func ConfigFileEnvFlagDecoderFactoryParams[T any, TP ConfigWithConfigPath[T]](ct
// provided we'll appropriately call Verify before returning.
DelayInitialVerification: true,
CallGlobalCallbacksAfterVerificationEnabled: true,
EnableStatusPage: params.EnableStatusPage,
}

d, err := dp.Config(ctx, (*T)(cfg), &blank, &env.Source{}, flagSrc)
Expand Down
Loading