Skip to content

Flag for interface exclusion #68

@tulzke

Description

@tulzke

Please add the ability to exclude interfaces, if source mode of mockgen is used.

This can be useful in the following case:

package segmentation

//go:generate mockgen -destination=segmenter_mock.go -package=segmentation -source=segmenter.go

// need to exlude this interface, because it is constraint
type Segment interface {
	~int
}

type Segmenter[V Segment] interface {
	Segment(code string) V
}

You can do this by passing a flag or using a comment like // gomock:exclude

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions