MCPcopy
hub / github.com/yuk7/wsldl / GetCommandWithDeps

Function GetCommandWithDeps

src/run/command.go:93–104  ·  view source on GitHub ↗

GetCommandWithDeps returns the run command structure with injectable dependencies.

(wsl wsllib.WslLib)

Source from the content-addressed store, hash-verified

91
92// GetCommandWithDeps returns the run command structure with injectable dependencies.
93func GetCommandWithDeps(wsl wsllib.WslLib) cmdline.Command {
94 return cmdline.Command{
95 Names: []string{"run", "-c", "/c"},
96 Visible: func(distroName string) bool {
97 return wsl.IsDistributionRegistered(distroName)
98 },
99 HelpText: getHelpMessage,
100 Run: func(name string, args []string) error {
101 return execute(wsl, name, args)
102 },
103 }
104}
105
106// GetCommandP returns the runp command structure
107func GetCommandP() cmdline.Command {

Calls 2

executeFunction · 0.70