Closed PCM2 closed 4 years ago
Dev mode plugins are loaded from the local GOPATH
It's wrong: the GOPATH
from Go is not used, the dev plugins can use any path as gopath and there is no default.
GOPATH
is an env var and we don't use this env var.
I think that @PCM2 was speaking about the goPath set in the static config.
I understand because I know how it works but only few people will understand that.
I prefer to not use the word (in uppercase) GOPATH
or the term "local" to describe the plugin behavior.
I prefer to not use the word (in uppercase)
GOPATH
or the term "local" to describe the plugin behavior.
OK, understood on "GOPATH" but you invented the spelling "GoPath," which no one will understand, either. Can we say you need to "specify a path to a Go workspace"?
Why do you not like "local"? I think this will be the #1 factor that will be important to people using dev mode -- that the plugin is loaded from the local machine (local to Traefik) rather than from GitHub.
Why do you not like "local"?
Because my local GOPATH is the GOPATH, yes I'm a Go dev :smile:
Can we say you need to "specify a path to a Go workspace"?
Yes and we can add: "The Go workspace is the equivalent of the concept of GOPATH
for a local Go environment dedicated to plugins. It can be the local GOPATH
or any directory."
We can also use gopath
(in lower case) as the go
command line.
Note: I recommend to not use the local GOPATH
as gopath
because it can cause some side effect with dependencies (ex: a dependency can be use from the GOPATH
instead of the vendor folder).
See if this change does it for you.
This PR adds some language to the developer docs to clarify how "dev mode" works for testing plugins. Specifically, it makes clear that: