mirror of
https://github.com/kubenetworks/kubevpn.git
synced 2025-10-20 22:09:31 +08:00

refactor: update go mod library and refactor dev logic Co-authored-by: wencaiwulue <895703375@qq.com>
22 lines
389 B
Go
22 lines
389 B
Go
package manager
|
|
|
|
import "os/exec"
|
|
|
|
// Candidate represents a possible plugin candidate, for mocking purposes
|
|
type Candidate interface {
|
|
Path() string
|
|
Metadata() ([]byte, error)
|
|
}
|
|
|
|
type candidate struct {
|
|
path string
|
|
}
|
|
|
|
func (c *candidate) Path() string {
|
|
return c.path
|
|
}
|
|
|
|
func (c *candidate) Metadata() ([]byte, error) {
|
|
return exec.Command(c.path, MetadataSubcommandName).Output()
|
|
}
|