pkg/plugins: move Plugin.ScopedPath to platform-agnostic file
Since 0e5eaf8ee3
, these implementations
were fully identical, so removing the duplicate, and move it to a
platform-agnostic file.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
e4134d5c0d
commit
20889dbac6
3 changed files with 6 additions and 16 deletions
|
@ -101,6 +101,12 @@ func (p *Plugin) IsV1() bool {
|
|||
return true
|
||||
}
|
||||
|
||||
// ScopedPath returns the path scoped to the plugin's rootfs.
|
||||
// For v1 plugins, this always returns the path unchanged as v1 plugins run directly on the host.
|
||||
func (p *Plugin) ScopedPath(s string) string {
|
||||
return s
|
||||
}
|
||||
|
||||
// NewLocalPlugin creates a new local plugin.
|
||||
func NewLocalPlugin(name, addr string) *Plugin {
|
||||
return &Plugin{
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
//go:build !windows
|
||||
|
||||
package plugins // import "github.com/docker/docker/pkg/plugins"
|
||||
|
||||
// ScopedPath returns the path scoped to the plugin's rootfs.
|
||||
// For v1 plugins, this always returns the path unchanged as v1 plugins run directly on the host.
|
||||
func (p *Plugin) ScopedPath(s string) string {
|
||||
return s
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
package plugins // import "github.com/docker/docker/pkg/plugins"
|
||||
|
||||
// ScopedPath returns the path scoped to the plugin's rootfs.
|
||||
// For v1 plugins, this always returns the path unchanged as v1 plugins run directly on the host.
|
||||
func (p *Plugin) ScopedPath(s string) string {
|
||||
return s
|
||||
}
|
Loading…
Add table
Reference in a new issue