Add possibility to add replace
to the generated go.mod
#32
Labels
enhancement
New feature or request
replace
to the generated go.mod
#32
Certain projects have the need for defining
replace
directives in theirgo.mod
to build.I've tried to use the
--with
argument to pass additionalreplace
directives:This will correctly add
replace
s in the resultinggo.mod
:However it also adds imports in the
main.go
:The problem with these imports is, that there are no top-level packages for e.g. k8s.io/client-go,
resulting in the following error:
Removing the imports and running
go mod tidy && go build -o xk6-loki main.go
in the build environment manually solves the problem.I would like to suggest to add an option to add replace directives without adding the package imports to the main.go file. This could for example be done with a separate
--replace
argument.The text was updated successfully, but these errors were encountered: