Skip to content

Conversation

@OrestisIon
Copy link
Contributor

Adding a Fluent Builder pattern

Copy link
Contributor

@toastwaffle toastwaffle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please golangci-lint fmt ./...

for _, k := range keys {
rk, err := newReflectKey(k)
if err != nil {
panic(fmt.Errorf("invalid key passed to Provides: %w", err))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not ok with this panicking. At a minimum it should use the Must helper, but I think it would be better to capture the errors, store them in the builder struct as a slice, and have the Build function return the errors (and then optionally provide a Tasks method which calls Must(Build()) like we do for ReflectMulti)

@toastwaffle
Copy link
Contributor

Superseded by #3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants