pkg/reexec: deprecate and migrate to github.com/moby/sys/reexec#49129
pkg/reexec: deprecate and migrate to github.com/moby/sys/reexec#49129akerouanton merged 1 commit intomoby:masterfrom
Conversation
4ef9349 to
e80b96f
Compare
pkg/reexec/reexec_deprecated.go
Outdated
| // Register adds an initialization func under the specified name. It panics | ||
| // if the given name is already registered. | ||
| // | ||
| // Deprecated: uUse [reexec.Register] instead. |
There was a problem hiding this comment.
typo: uUse -> use
Also looks like the other functions got it as well.
| package reexec | ||
|
|
||
| import ( | ||
| "os/exec" |
There was a problem hiding this comment.
Is this dependency required for the godoc link?
There was a problem hiding this comment.
It's needed for the aliases currently, as exec.Cmd is part of the signature;
func Command(args ...string) *exec.Cmd {The alternative is to use variables to alias, but I slightly moved away from that approach, as pkg.go.dev docs will then show an empty "functions" block, and only "variables" in the package. Also because these are exported, it would mean technically anything could overwrite / replace the function, which definitely would be unwanted.
I once opened a proposal in Go's issue tracker for being able to alias a package as a whole, but they were not receptive to that;
Signed-off-by: Sebastiaan van Stijn <[email protected]>
e80b96f to
4f5ec99
Compare


/pkg#32989- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)