Skip to content

Make go tool minimock work #175

Description

@ruz

Hi,

I haven't checked, but I hope it's doable without tons of changes. This makes maintaining tool dependencies so much easier.

go get -tool github.com/gojuno/minimock/v3@latest
go tool minimock ...

Above should use exact version for everybody no matter what's installed in the GOBIN dir. More on this https://tip.golang.org/doc/modules/managing-dependencies#tools

At the moment above fails with the following error:

go tool minimock -i VersionService -o ./mocks -s _mock.go -g
package github.com/gojuno/minimock/v3 is not a main package

Sure I still use go get -tool github.com/gojuno/minimock/v3@latest, but before go generate I do go install tool to get exact version in the GOBIN.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions