Nishanth Shanmugham
Nishanth Shanmugham
@hoijui: should "not recommend" -> "recommend" in your comment?
of course! i will tag a new version today.
I created a new tag `v0.8.3` that should include these changes. To check map literals for exhaustiveness, the `-check` flag must include `map`. See the invocation below for example. By...
Thank you, merged! And sorry for the delay. I will follow up with a commit to add `-maps` flag for checking maps, so users have a way to opt-in/opt-out of...
For anyone arriving here, I've added details in the related issue: https://github.com/nishanths/exhaustive/issues/7#issuecomment-879512515. It appears to be a general issue with golangci-lint not invalidating the cache when source files have changed.
Thank you for the issue. I think that exhaustiveness of struct fields may be better handled by other analyzers, such as [go-exhaustruct][1] (mentioned above) and [exhaustivestruct][2]. The scope of this...
Work-in-progress definition of the analyzer's behavior for type parameters. ### Initial version ``` # Type parameters A switch statement that switches on a value whose type is a type parameter...
Is it possible to use `MatchedBy` if my method takes multiple arguments? e.g. ```go func (o *Obj) Create(ctx context.Context, id string) error ``` The documentation requires the argument function passed...
I was able to resolve my earlier question using `AnythingOfType`. ``` go version go1.16 darwin/amd64 github.com/stretchr/testify v1.7.0 ``` ```go obj. On("Create", mock.AnythingOfType(fmt.Sprintf("%T", context.Background())), "xyz"). Return(nil). Times(1) ``` This also seems...
> Is it possible to use MatchedBy if my method takes multiple arguments? On further working this package, I think I would have had to do: ```go On("Create", mock.MatchedBy(func(_ context.Context)...