Actual behavior A clear and concise description of what the bug is.
The package alias produced by mockgen is variable for the same inputs. Specifically, sometimes we see
extract "github.com/codeclysm/extract/v3"
and others we see
v3 "github.com/codeclysm/extract/v3"
Also, using -imports extract=github.com/codeclysm/extract/v3 does not have any effect on the output.
Expected behavior A clear and concise description of what you expected to happen.
I expect the same inputs to product the same outputs.
I expect -imports to determine the package alias.
To Reproduce Steps to reproduce the behavior
This program creates a mock file with no mention of cheesecake, as expected. Am I using -imports correctly, and is that the effect it's supposed to have?
package main
import (
"context"
"io"
"github.com/codeclysm/extract/v3"
)
//go:generate go run github.com/golang/mock/mockgen -destination=mock_if.go -package main -source ./gomocktest.go -imports cheesecake=github.com/codeclysm/extract/v3
type IF interface {
ExtractGz(ctx context.Context, body io.Reader, location string, renamer extract.Renamer) error
ExtractZip(ctx context.Context, body io.Reader, location string, renamer extract.Renamer) error
}
func main() {
print("hello world")
}
Additional Information
gomock mode (reflect or source): Source, run from go generate although running directly has the same output.
gomock version or git ref: github.com/golang/mock v1.6.0
Actual behavior A clear and concise description of what the bug is.
The package alias produced by mockgen is variable for the same inputs. Specifically, sometimes we see
extract "github.com/codeclysm/extract/v3"
and others we seev3 "github.com/codeclysm/extract/v3"
Also, using-imports extract=github.com/codeclysm/extract/v3
does not have any effect on the output.Expected behavior A clear and concise description of what you expected to happen.
I expect the same inputs to product the same outputs. I expect -imports to determine the package alias.
To Reproduce Steps to reproduce the behavior
-imports
correctly, and is that the effect it's supposed to have?Additional Information
go generate
although running directly has the same output.Triage Notes for the Maintainers