Files
llgo/cmd/llgo/gop_autogen.go
2025-05-04 15:34:32 +08:00

195 lines
4.8 KiB
Go

// Code generated by gop (Go+); DO NOT EDIT.
package main
import (
"fmt"
"github.com/goplus/cobra/xcmd"
build1 "github.com/goplus/llgo/cmd/internal/build"
clean1 "github.com/goplus/llgo/cmd/internal/clean"
install1 "github.com/goplus/llgo/cmd/internal/install"
run1 "github.com/goplus/llgo/cmd/internal/run"
test1 "github.com/goplus/llgo/cmd/internal/test"
"github.com/goplus/llgo/internal/env"
"github.com/qiniu/x/stringutil"
"runtime"
)
const _ = true
type build struct {
xcmd.Command
*App
}
type clean struct {
xcmd.Command
*App
}
type cmptest struct {
xcmd.Command
*App
}
type get struct {
xcmd.Command
*App
}
type install struct {
xcmd.Command
*App
}
type run struct {
xcmd.Command
*App
}
type test struct {
xcmd.Command
*App
}
type version struct {
xcmd.Command
*App
}
type App struct {
xcmd.App
}
func (this *App) Main() {
_gop_obj0 := &build{App: this}
_gop_obj1 := &clean{App: this}
_gop_obj2 := &cmptest{App: this}
_gop_obj3 := &get{App: this}
_gop_obj4 := &install{App: this}
_gop_obj5 := &run{App: this}
_gop_obj6 := &test{App: this}
_gop_obj7 := &version{App: this}
xcmd.Gopt_App_Main(this, _gop_obj0, _gop_obj1, _gop_obj2, _gop_obj3, _gop_obj4, _gop_obj5, _gop_obj6, _gop_obj7)
}
//line cmd/llgo/build_cmd.gox:20
func (this *build) Main(_gop_arg0 string) {
this.Command.Main(_gop_arg0)
//line cmd/llgo/build_cmd.gox:20:1
this.Short("Compile packages and dependencies")
//line cmd/llgo/build_cmd.gox:22:1
this.FlagOff()
//line cmd/llgo/build_cmd.gox:24:1
this.Run__1(func(args []string) {
//line cmd/llgo/build_cmd.gox:25:1
build1.Cmd.Run(build1.Cmd, args)
})
}
func (this *build) Classfname() string {
return "build"
}
//line cmd/llgo/clean_cmd.gox:20
func (this *clean) Main(_gop_arg0 string) {
this.Command.Main(_gop_arg0)
//line cmd/llgo/clean_cmd.gox:20:1
this.Short("Remove object files and cached files")
//line cmd/llgo/clean_cmd.gox:22:1
this.FlagOff()
//line cmd/llgo/clean_cmd.gox:24:1
this.Run__1(func(args []string) {
//line cmd/llgo/clean_cmd.gox:25:1
clean1.Cmd.Run(clean1.Cmd, args)
})
}
func (this *clean) Classfname() string {
return "clean"
}
//line cmd/llgo/cmptest_cmd.gox:20
func (this *cmptest) Main(_gop_arg0 string) {
this.Command.Main(_gop_arg0)
//line cmd/llgo/cmptest_cmd.gox:20:1
this.Short("Compile and run with llgo, compare result (stdout/stderr/exitcode) with go or llgo.expect; generate llgo.expect file if -gen is specified")
//line cmd/llgo/cmptest_cmd.gox:22:1
this.FlagOff()
//line cmd/llgo/cmptest_cmd.gox:24:1
this.Run__1(func(args []string) {
//line cmd/llgo/cmptest_cmd.gox:25:1
run1.CmpTestCmd.Run(run1.CmpTestCmd, args)
})
}
func (this *cmptest) Classfname() string {
return "cmptest"
}
//line cmd/llgo/get_cmd.gox:16
func (this *get) Main(_gop_arg0 string) {
this.Command.Main(_gop_arg0)
//line cmd/llgo/get_cmd.gox:16:1
this.Short("Add dependencies to current module and install them")
//line cmd/llgo/get_cmd.gox:18:1
this.Run__1(func(args []string) {
//line cmd/llgo/get_cmd.gox:19:1
panic("todo")
})
}
func (this *get) Classfname() string {
return "get"
}
//line cmd/llgo/install_cmd.gox:20
func (this *install) Main(_gop_arg0 string) {
this.Command.Main(_gop_arg0)
//line cmd/llgo/install_cmd.gox:20:1
this.Short("Compile and install packages and dependencies")
//line cmd/llgo/install_cmd.gox:22:1
this.FlagOff()
//line cmd/llgo/install_cmd.gox:24:1
this.Run__1(func(args []string) {
//line cmd/llgo/install_cmd.gox:25:1
install1.Cmd.Run(install1.Cmd, args)
})
}
func (this *install) Classfname() string {
return "install"
}
//line cmd/llgo/run_cmd.gox:20
func (this *run) Main(_gop_arg0 string) {
this.Command.Main(_gop_arg0)
//line cmd/llgo/run_cmd.gox:20:1
this.Short("Compile and run Go program")
//line cmd/llgo/run_cmd.gox:22:1
this.FlagOff()
//line cmd/llgo/run_cmd.gox:24:1
this.Run__1(func(args []string) {
//line cmd/llgo/run_cmd.gox:25:1
run1.Cmd.Run(run1.Cmd, args)
})
}
func (this *run) Classfname() string {
return "run"
}
//line cmd/llgo/test_cmd.gox:20
func (this *test) Main(_gop_arg0 string) {
this.Command.Main(_gop_arg0)
//line cmd/llgo/test_cmd.gox:20:1
this.Short("Compile and run Go test")
//line cmd/llgo/test_cmd.gox:22:1
this.FlagOff()
//line cmd/llgo/test_cmd.gox:24:1
this.Run__1(func(args []string) {
//line cmd/llgo/test_cmd.gox:25:1
test1.Cmd.Run(test1.Cmd, args)
})
}
func (this *test) Classfname() string {
return "test"
}
//line cmd/llgo/version_cmd.gox:22
func (this *version) Main(_gop_arg0 string) {
this.Command.Main(_gop_arg0)
//line cmd/llgo/version_cmd.gox:22:1
this.Short("Print LLGo version")
//line cmd/llgo/version_cmd.gox:24:1
this.Run__0(func() {
//line cmd/llgo/version_cmd.gox:25:1
fmt.Println(stringutil.Concat("llgo ", env.Version(), " ", runtime.GOOS, "/", runtime.GOARCH))
})
}
func (this *version) Classfname() string {
return "version"
}
func main() {
//line cmd/llgo/version_cmd.gox:24:1
new(App).Main()
}