func main() { pl := plugin.New("brew", pluginVersion) pl.Use(setBrew(NewBrewServer(pl.Logger))) pl.RegisterAPI(apiService) os.Exit(pl.RunCmd(os.Args)) }
func main() { pl := plugin.New("shell", version) pl.RegisterAPI(apiService) if code := pl.Parse(os.Args); code > 0 { os.Exit(code) } cmder := NewCommander(pl.StatePath("commands")) if err := cmder.Init(); err != nil { pl.Error("Commander init error", "error", err) os.Exit(1) } pl.Use( setCmd(cmder), ) os.Exit(pl.Run()) }
func main() { pl := plugin.New("go", version) os.Exit(pl.RunCmd(os.Args)) }
func main() { pl := plugin.New("system", version) pl.RegisterAPI(apiService) os.Exit(pl.RunCmd(os.Args)) }