moby/libnetwork/config/config_linux.go
Sebastiaan van Stijn 91a3a95385
libnetwork/options: OptionExecRoot: skip osl.SetBasePath on non-Linux
The basepath is only used on Linux, so no need to call it on other
platforms. SetBasePath was already stubbed out on other platforms,
but "osl" was still imported in various places where it was not actually
used, so trying to reduce imports to get a better picture of what parts
are used (and not used).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-12 15:29:20 +02:00

11 lines
276 B
Go

package config
import "github.com/docker/docker/libnetwork/osl"
// optionExecRoot on Linux sets both the controller's ExecRoot and osl.basePath.
func optionExecRoot(execRoot string) Option {
return func(c *Config) {
c.ExecRoot = execRoot
osl.SetBasePath(execRoot)
}
}