matryer / matryer/moq

Feature request: allow multiple source dirs

Open
#152 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
2.2k
Forks
135
Avg merge
11d 6h
Merged PRs (30d)
1

Description

Hi there,

`moq` allows generating multiple interfaces from the same package, but not multiple interfaces from multiple packages. That would be great to have a single file `mocks_test.go` instead (at least) a file per package with interfaces we want to mock.

Having a single file makes it somewhat simpler, but I'm not sure how complex is to implement.

Opinions?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the source-directory and output-generation entry points, then check how multiple packages are currently handled. Define the expected single mocks_test.go behavior and add coverage for interfaces from multiple packages; the issue names no implementation files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.