golang / mock

GoMock is a mocking framework for the Go programming language.
Apache License 2.0
9.3k stars 611 forks source link

Support type-safe return values #630

Closed tra4less closed 9 months ago

tra4less commented 2 years ago

622 #427 #634 #657

danielvladco commented 2 years ago

Hi, is there any progress on this PR?

falsaffa commented 2 years ago

Hey, any updates here?

cc @codyoss

trim21 commented 2 years ago

any progress on this?

falsaffa commented 2 years ago

Hey @codyoss , is there anything @n0trace/we/anyone can do to help get this PR reviewed and approved?

tra4less commented 2 years ago

The implementation changed, by adding a flag. @codyoss @Trim21 reference #622

trim21 commented 2 years ago

add new flag in readme?

falsaffa commented 2 years ago

@codyoss @n0trace any progress with the PR?

tra4less commented 2 years ago

cc @codyoss

rekby commented 2 years ago

@codyoss Is any ETA for review of the PR?

jhalterman commented 1 year ago

Would love to see this reviewed. Putting the feature behind a new flag seems like a good way to introduce it.

trim21 commented 1 year ago

/ping

alvarotuso commented 1 year ago

Bump. This would be very useful.

trim21 commented 1 year ago

cc @codyoss

skynet2 commented 1 year ago

hi @n0trace , this also requires one additional fix for optional vars.

Example interface:

import (
    "context"
    "fmt"

    "github.com/aws/aws-sdk-go-v2/aws"
    "github.com/aws/aws-sdk-go-v2/config"
    "github.com/aws/aws-sdk-go-v2/service/s3"
)

type s3Client interface {
    HeadBucket(ctx context.Context, input *s3.HeadBucketInput, opts ...func(*s3.Options)) (*s3.HeadBucketOutput, error)
}

will generate incorrect mock Return func: image fix is https://github.com/skynet2/mock/commit/ca75ee65a535230e0f517a626f35d48646b50d0b image

Thanks

trim21 commented 1 year ago

@codyoss can anyone review this PR?

tra4less commented 1 year ago

@codyoss can anyone review this PR?

Good news: Codyoss' github is highly active. Bad news: Not active in this repository.