248 lines
6.3 KiB
Go
248 lines
6.3 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"
|
|
cppkg1 "github.com/goplus/llgo/xtool/cppkg"
|
|
"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 cppkg struct {
|
|
xcmd.Command
|
|
*App
|
|
}
|
|
type cppkg_install 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 := &cppkg{App: this}
|
|
_gop_obj4 := &cppkg_install{App: this}
|
|
_gop_obj5 := &get{App: this}
|
|
_gop_obj6 := &install{App: this}
|
|
_gop_obj7 := &run{App: this}
|
|
_gop_obj8 := &test{App: this}
|
|
_gop_obj9 := &version{App: this}
|
|
xcmd.Gopt_App_Main(this, _gop_obj0, _gop_obj1, _gop_obj2, _gop_obj3, _gop_obj4, _gop_obj5, _gop_obj6, _gop_obj7, _gop_obj8, _gop_obj9)
|
|
}
|
|
//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/cppkg_cmd.gox:16
|
|
func (this *cppkg) Main(_gop_arg0 string) {
|
|
this.Command.Main(_gop_arg0)
|
|
//line cmd/llgo/cppkg_cmd.gox:16:1
|
|
this.Short("Manage C/C++ packages")
|
|
//line cmd/llgo/cppkg_cmd.gox:18:1
|
|
this.Run__0(func() {
|
|
//line cmd/llgo/cppkg_cmd.gox:19:1
|
|
this.Help()
|
|
})
|
|
}
|
|
func (this *cppkg) Classfname() string {
|
|
return "cppkg"
|
|
}
|
|
//line cmd/llgo/cppkg_install_cmd.gox:20
|
|
func (this *cppkg_install) Main(_gop_arg0 string) {
|
|
this.Command.Main(_gop_arg0)
|
|
//line cmd/llgo/cppkg_install_cmd.gox:20:1
|
|
this.Short("Install a C/C++ package from github.com/goplus/cppkg")
|
|
//line cmd/llgo/cppkg_install_cmd.gox:22:1
|
|
this.Long(`Installs a C/C++ package with the given name and version. For example:
|
|
|
|
llgo cppkg install davegamble/cjson@1.7.18
|
|
llgo cppkg install davegamble/cjson@latest
|
|
llgo cppkg install davegamble/cjson
|
|
`)
|
|
//line cmd/llgo/cppkg_install_cmd.gox:29:1
|
|
this.Run__1(func(args []string) {
|
|
//line cmd/llgo/cppkg_install_cmd.gox:30:1
|
|
if len(args) < 1 {
|
|
//line cmd/llgo/cppkg_install_cmd.gox:31:1
|
|
this.Help()
|
|
//line cmd/llgo/cppkg_install_cmd.gox:32:1
|
|
return
|
|
}
|
|
//line cmd/llgo/cppkg_install_cmd.gox:35:1
|
|
cppkg1.Install(args[0], cppkg1.DefaultFlags)
|
|
})
|
|
}
|
|
func (this *cppkg_install) Classfname() string {
|
|
return "cppkg_install"
|
|
}
|
|
//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()
|
|
}
|