Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package name in generated doc string seems odd #117

Open
FlorianLoch opened this issue Aug 30, 2024 · 1 comment
Open

Package name in generated doc string seems odd #117

FlorianLoch opened this issue Aug 30, 2024 · 1 comment

Comments

@FlorianLoch
Copy link

I have an interface for which I generate a mock using:

//go:generate go run github.com/gojuno/minimock/v3/cmd/minimock -g -s _mock.go -i ./api.MyClient -o ./internal/api/mocks/

It generates me the following code:

import (
	"context"
	"sync"
	mm_atomic "sync/atomic"
	mm_time "time"

	"github.com/florianloch/some_service/api"
	"github.com/gojuno/minimock/v3"
)

// MyClientMock implements mm_api.MyClient
type MyClientMock struct {

It of course does not affect compilation but it's irritating to get the package name prefixed with mm_ in the doc string.

If that is something worth fixing I could take a look at it.

@zcolleen
Copy link
Collaborator

Hey @FlorianLoch thanks for issue! That happens because here we prefix source package with mm which then converts to interface type name.

I think this certainly worth fixing, so if you could take a look that would be cool

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

No branches or pull requests

2 participants