Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daemon: getPluginExecRoot(): pass config #44310

Merged
merged 1 commit into from Oct 25, 2022

Conversation

thaJeztah
Copy link
Member

Had this stashed in another branch, but wasn't really related to those changes, so lets move it separate

This makes it more transparent that it's unused for Linux, and we don't pass "root", which has no relation with the path on Linux.

This makes it more transparent that it's unused for Linux,
and we don't pass "root", which has no relation with the
path on Linux.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added status/2-code-review area/plugins kind/refactor PR's that refactor, or clean-up code labels Oct 17, 2022
@thaJeztah thaJeztah added this to the v-next milestone Oct 17, 2022
@@ -20,7 +20,7 @@ import (
// instead of deriving path from daemon's exec-root. This is because
// plugin socket files are created here and they cannot exceed max
// path length of 108 bytes.
func getPluginExecRoot(root string) string {
func getPluginExecRoot(_ *config.Config) string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fun fact: if all args are unused, you can elide the names completely.

Suggested change
func getPluginExecRoot(_ *config.Config) string {
func getPluginExecRoot(*config.Config) string {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! TIL didn't know that!

@cpuguy83 cpuguy83 merged commit 6c5ca97 into moby:master Oct 25, 2022
@thaJeztah thaJeztah deleted the daemon_getPluginExecRoot branch October 25, 2022 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugins kind/refactor PR's that refactor, or clean-up code status/2-code-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants