Skip to content

Commit 179c8d5

Browse files
authored
chore(wire): init reserve event types (#3680)
1 parent 8dde17a commit 179c8d5

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

app/common/config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ var Config = wire.NewSet(
4646
wire.FieldsOf(new(config.Configuration), "ProductCatalog"),
4747
// ProgressManager
4848
wire.FieldsOf(new(config.Configuration), "ProgressManager"),
49+
// Reserved Event Types
50+
wire.FieldsOf(new(config.Configuration), "ReservedEventTypes"),
4951
// Svix
5052
wire.FieldsOf(new(config.Configuration), "Svix"),
5153
// Telemetry

app/config/config.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ func (c Configuration) Validate() error {
114114

115115
for _, pattern := range c.ReservedEventTypes {
116116
if _, err := regexp.Compile(pattern); err != nil {
117-
errs = append(errs, fmt.Errorf("reserved event type pattern %q: invalid regular expression", pattern))
117+
errs = append(errs, errorsx.WithPrefix(
118+
fmt.Errorf("reserved event type pattern %q: invalid regular expression", pattern),
119+
"reserved event types",
120+
))
118121
}
119122
}
120123

cmd/server/wire.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ type Application struct {
8686

8787
func initializeApplication(ctx context.Context, conf config.Configuration) (Application, func(), error) {
8888
wire.Build(
89-
wire.FieldsOf(new(config.Configuration), "ReservedEventTypes"),
90-
9189
metadata,
9290
common.App,
9391
common.Billing,

0 commit comments

Comments
 (0)