Skip to content

Commit 6d35c8a

Browse files
committed
ez: plumb through EnableStatusPage
1 parent d74d5dc commit 6d35c8a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ez/ez.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ type Params[T any] struct {
8888
// things.
8989
// (Currently only affects the yaml decoder)
9090
FlattenAnonymousFields bool
91+
92+
// If enabled, Dials will retain the slice of reported source-values so
93+
// it can render a status page using [github.com/vimeo/go-status-page]
94+
//
95+
// This feature is experimental and go-status-page may generate panics
96+
// while rendering pages.
97+
//
98+
// It is heavily recommended that users of this functionality set
99+
// `statuspage:"-"` tags on any sensitive fields with secrets/credentials, etc.
100+
EnableStatusPage bool
91101
}
92102

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

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

0 commit comments

Comments
 (0)