// Code generated by xgo (XGo); DO NOT EDIT.

package main

import (
	"fmt"
	"github.com/goplus/cobra/xcmd"
	"github.com/goplus/gogen"
	"github.com/goplus/xgo/cmd/internal/bug"
	"github.com/goplus/xgo/cmd/internal/build"
	"github.com/goplus/xgo/cmd/internal/clean"
	"github.com/goplus/xgo/cmd/internal/doc"
	"github.com/goplus/xgo/cmd/internal/env"
	"github.com/goplus/xgo/cmd/internal/gengo"
	"github.com/goplus/xgo/cmd/internal/gopfmt"
	"github.com/goplus/xgo/cmd/internal/gopget"
	"github.com/goplus/xgo/cmd/internal/install"
	"github.com/goplus/xgo/cmd/internal/mod"
	"github.com/goplus/xgo/cmd/internal/run"
	"github.com/goplus/xgo/cmd/internal/serve"
	"github.com/goplus/xgo/cmd/internal/test"
	"github.com/goplus/xgo/cmd/internal/watch"
	env1 "github.com/goplus/xgo/env"
	"github.com/qiniu/x/log"
	"github.com/qiniu/x/stringutil"
	"runtime"
)

const _ = true

type Cmd_bug struct {
	xcmd.Command
	*App
}
type Cmd_build struct {
	xcmd.Command
	*App
}
type Cmd_clean struct {
	xcmd.Command
	*App
}
type Cmd_doc struct {
	xcmd.Command
	*App
}
type Cmd_env struct {
	xcmd.Command
	*App
}
type Cmd_fmt struct {
	xcmd.Command
	*App
}
type Cmd_get struct {
	xcmd.Command
	*App
}
type Cmd_go struct {
	xcmd.Command
	*App
}
type Cmd_install struct {
	xcmd.Command
	*App
}
type App struct {
	xcmd.App
}
type Cmd_mod struct {
	xcmd.Command
	*App
}
type Cmd_mod_download struct {
	xcmd.Command
	*App
}
type Cmd_mod_init struct {
	xcmd.Command
	*App
}
type Cmd_mod_tidy struct {
	xcmd.Command
	*App
}
type Cmd_run struct {
	xcmd.Command
	*App
}
type Cmd_serve struct {
	xcmd.Command
	*App
}
type Cmd_test struct {
	xcmd.Command
	*App
}
type Cmd_version struct {
	xcmd.Command
	*App
}
type Cmd_watch struct {
	xcmd.Command
	*App
}

//line cmd/xgo/main_app.gox:6
func (this *App) MainEntry() {
//line cmd/xgo/main_app.gox:6:1
	this.Short("xgo is a tool for managing XGo source code.")
//line cmd/xgo/main_app.gox:7:1
	log.SetFlags(log.Ldefault &^ log.LstdFlags)
//line cmd/xgo/main_app.gox:9:1
	gogen.GeneratedHeader = "// Code generated by xgo (XGo); DO NOT EDIT.\n\n"
}
func (this *App) Main() {
	_xgo_obj0 := &Cmd_bug{App: this}
	_xgo_obj1 := &Cmd_build{App: this}
	_xgo_obj2 := &Cmd_clean{App: this}
	_xgo_obj3 := &Cmd_doc{App: this}
	_xgo_obj4 := &Cmd_env{App: this}
	_xgo_obj5 := &Cmd_fmt{App: this}
	_xgo_obj6 := &Cmd_get{App: this}
	_xgo_obj7 := &Cmd_go{App: this}
	_xgo_obj8 := &Cmd_install{App: this}
	_xgo_obj9 := &Cmd_mod{App: this}
	_xgo_obj10 := &Cmd_mod_download{App: this}
	_xgo_obj11 := &Cmd_mod_init{App: this}
	_xgo_obj12 := &Cmd_mod_tidy{App: this}
	_xgo_obj13 := &Cmd_run{App: this}
	_xgo_obj14 := &Cmd_serve{App: this}
	_xgo_obj15 := &Cmd_test{App: this}
	_xgo_obj16 := &Cmd_version{App: this}
	_xgo_obj17 := &Cmd_watch{App: this}
	xcmd.Gopt_App_Main(this, _xgo_obj0, _xgo_obj1, _xgo_obj2, _xgo_obj3, _xgo_obj4, _xgo_obj5, _xgo_obj6, _xgo_obj7, _xgo_obj8, _xgo_obj9, _xgo_obj10, _xgo_obj11, _xgo_obj12, _xgo_obj13, _xgo_obj14, _xgo_obj15, _xgo_obj16, _xgo_obj17)
}

//line cmd/xgo/bug_cmd.gox:20
func (this *Cmd_bug) Main(_xgo_arg0 string) {
	this.Command.Main(_xgo_arg0)
//line cmd/xgo/bug_cmd.gox:20:1
	this.Use("bug")
//line cmd/xgo/bug_cmd.gox:22:1
	this.Short("Start a bug report")
//line cmd/xgo/bug_cmd.gox:24:1
	this.FlagOff()
//line cmd/xgo/bug_cmd.gox:26:1
	this.Run__1(func(args []string) {
//line cmd/xgo/bug_cmd.gox:27:1
		bug.Cmd.Run(bug.Cmd, args)
	})
}
func (this *Cmd_bug) Classfname() string {
	return "bug"
}

//line cmd/xgo/build_cmd.gox:20
func (this *Cmd_build) Main(_xgo_arg0 string) {
	this.Command.Main(_xgo_arg0)
//line cmd/xgo/build_cmd.gox:20:1
	this.Use("build [flags] [packages]")
//line cmd/xgo/build_cmd.gox:22:1
	this.Short("Build XGo files")
//line cmd/xgo/build_cmd.gox:24:1
	this.FlagOff()
//line cmd/xgo/build_cmd.gox:26:1
	this.Run__1(func(args []string) {
//line cmd/xgo/build_cmd.gox:27:1
		build.Cmd.Run(build.Cmd, args)
	})
}
func (this *Cmd_build) Classfname() string {
	return "build"
}

//line cmd/xgo/clean_cmd.gox:20
func (this *Cmd_clean) Main(_xgo_arg0 string) {
	this.Command.Main(_xgo_arg0)
//line cmd/xgo/clean_cmd.gox:20:1
	this.Use("clean [flags] <gopSrcDir>")
//line cmd/xgo/clean_cmd.gox:22:1
	this.Short("Clean all XGo auto generated files")
//line cmd/xgo/clean_cmd.gox:24:1
	this.FlagOff()
//line cmd/xgo/clean_cmd.gox:26:1
	this.Run__1(func(args []string) {
//line cmd/xgo/clean_cmd.gox:27:1
		clean.Cmd.Run(clean.Cmd, args)
	})
}
func (this *Cmd_clean) Classfname() string {
	return "clean"
}

//line cmd/xgo/doc_cmd.gox:20
func (this *Cmd_doc) Main(_xgo_arg0 string) {
	this.Command.Main(_xgo_arg0)
//line cmd/xgo/doc_cmd.gox:20:1
	this.Use("doc [flags] [pkgPath]")
//line cmd/xgo/doc_cmd.gox:22:1
	this.Short("Show documentation for package or symbol")
//line cmd/xgo/doc_cmd.gox:24:1
	this.FlagOff()
//line cmd/xgo/doc_cmd.gox:26:1
	this.Run__1(func(args []string) {
//line cmd/xgo/doc_cmd.gox:27:1
		doc.Cmd.Run(doc.Cmd, args)
	})
}
func (this *Cmd_doc) Classfname() string {
	return "doc"
}

//line cmd/xgo/env_cmd.gox:20
func (this *Cmd_env) Main(_xgo_arg0 string) {
	this.Command.Main(_xgo_arg0)
//line cmd/xgo/env_cmd.gox:20:1
	this.Use("env [flags] [var ...]")
//line cmd/xgo/env_cmd.gox:22:1
	this.Short("Prints XGo environment information")
//line cmd/xgo/env_cmd.gox:24:1
	this.FlagOff()
//line cmd/xgo/env_cmd.gox:26:1
	this.Run__1(func(args []string) {
//line cmd/xgo/env_cmd.gox:27:1
		env.Cmd.Run(env.Cmd, args)
	})
}
func (this *Cmd_env) Classfname() string {
	return "env"
}

//line cmd/xgo/fmt_cmd.gox:20
func (this *Cmd_fmt) Main(_xgo_arg0 string) {
	this.Command.Main(_xgo_arg0)
//line cmd/xgo/fmt_cmd.gox:20:1
	this.Use("fmt [flags] path ...")
//line cmd/xgo/fmt_cmd.gox:22:1
	this.Short("Format XGo packages")
//line cmd/xgo/fmt_cmd.gox:24:1
	this.FlagOff()
//line cmd/xgo/fmt_cmd.gox:26:1
	this.Run__1(func(args []string) {
//line cmd/xgo/fmt_cmd.gox:27:1
		gopfmt.Cmd.Run(gopfmt.Cmd, args)
	})
}
func (this *Cmd_fmt) Classfname() string {
	return "fmt"
}

//line cmd/xgo/get_cmd.gox:20
func (this *Cmd_get) Main(_xgo_arg0 string) {
	this.Command.Main(_xgo_arg0)
//line cmd/xgo/get_cmd.gox:20:1
	this.Use("get [flags] [packages]")
//line cmd/xgo/get_cmd.gox:22:1
	this.Short("Add dependencies to current module and install them")
//line cmd/xgo/get_cmd.gox:24:1
	this.FlagOff()
//line cmd/xgo/get_cmd.gox:26:1
	this.Run__1(func(args []string) {
//line cmd/xgo/get_cmd.gox:27:1
		gopget.Cmd.Run(gopget.Cmd, args)
	})
}
func (this *Cmd_get) Classfname() string {
	return "get"
}

//line cmd/xgo/go_cmd.gox:20
func (this *Cmd_go) Main(_xgo_arg0 string) {
	this.Command.Main(_xgo_arg0)
//line cmd/xgo/go_cmd.gox:20:1
	this.Use("go [flags] [packages|files]")
//line cmd/xgo/go_cmd.gox:22:1
	this.Short("Convert XGo code into Go code")
//line cmd/xgo/go_cmd.gox:24:1
	this.FlagOff()
//line cmd/xgo/go_cmd.gox:26:1
	this.Run__1(func(args []string) {
//line cmd/xgo/go_cmd.gox:27:1
		gengo.Cmd.Run(gengo.Cmd, args)
	})
}
func (this *Cmd_go) Classfname() string {
	return "go"
}

//line cmd/xgo/install_cmd.gox:20
func (this *Cmd_install) Main(_xgo_arg0 string) {
	this.Command.Main(_xgo_arg0)
//line cmd/xgo/install_cmd.gox:20:1
	this.Use("install [flags] [packages]")
//line cmd/xgo/install_cmd.gox:22:1
	this.Short("Build XGo files and install target to GOBIN")
//line cmd/xgo/install_cmd.gox:24:1
	this.FlagOff()
//line cmd/xgo/install_cmd.gox:26:1
	this.Run__1(func(args []string) {
//line cmd/xgo/install_cmd.gox:27:1
		install.Cmd.Run(install.Cmd, args)
	})
}
func (this *Cmd_install) Classfname() string {
	return "install"
}

//line cmd/xgo/mod_cmd.gox:20
func (this *Cmd_mod) Main(_xgo_arg0 string) {
	this.Command.Main(_xgo_arg0)
//line cmd/xgo/mod_cmd.gox:20:1
	this.Use("mod")
//line cmd/xgo/mod_cmd.gox:22:1
	this.Short("Module maintenance")
//line cmd/xgo/mod_cmd.gox:24:1
	this.Run__0(func() {
//line cmd/xgo/mod_cmd.gox:25:1
		this.Help()
	})
}
func (this *Cmd_mod) Classfname() string {
	return "mod"
}

//line cmd/xgo/mod_download_cmd.gox:20
func (this *Cmd_mod_download) Main(_xgo_arg0 string) {
	this.Command.Main(_xgo_arg0)
//line cmd/xgo/mod_download_cmd.gox:20:1
	this.Use("download [flags] [modules]")
//line cmd/xgo/mod_download_cmd.gox:22:1
	this.Short("download modules to local cache")
//line cmd/xgo/mod_download_cmd.gox:24:1
	this.FlagOff()
//line cmd/xgo/mod_download_cmd.gox:26:1
	this.Run__1(func(args []string) {
//line cmd/xgo/mod_download_cmd.gox:27:1
		if len(args) < 1 {
//line cmd/xgo/mod_download_cmd.gox:28:1
			this.Help()
//line cmd/xgo/mod_download_cmd.gox:29:1
			return
		}
//line cmd/xgo/mod_download_cmd.gox:31:1
		mod.CmdDownload.Run(mod.CmdDownload, args)
	})
}
func (this *Cmd_mod_download) Classfname() string {
	return "mod_download"
}

//line cmd/xgo/mod_init_cmd.gox:20
func (this *Cmd_mod_init) Main(_xgo_arg0 string) {
	this.Command.Main(_xgo_arg0)
//line cmd/xgo/mod_init_cmd.gox:20:1
	this.Use("init [flags] module-path")
//line cmd/xgo/mod_init_cmd.gox:22:1
	this.Short("initialize new module in current directory")
//line cmd/xgo/mod_init_cmd.gox:24:1
	this.FlagOff()
//line cmd/xgo/mod_init_cmd.gox:26:1
	this.Run__1(func(args []string) {
//line cmd/xgo/mod_init_cmd.gox:27:1
		if len(args) < 1 {
//line cmd/xgo/mod_init_cmd.gox:28:1
			this.Help()
//line cmd/xgo/mod_init_cmd.gox:29:1
			return
		}
//line cmd/xgo/mod_init_cmd.gox:31:1
		mod.CmdInit.Run(mod.CmdInit, args)
	})
}
func (this *Cmd_mod_init) Classfname() string {
	return "mod_init"
}

//line cmd/xgo/mod_tidy_cmd.gox:20
func (this *Cmd_mod_tidy) Main(_xgo_arg0 string) {
	this.Command.Main(_xgo_arg0)
//line cmd/xgo/mod_tidy_cmd.gox:20:1
	this.Use("tidy [flags]")
//line cmd/xgo/mod_tidy_cmd.gox:22:1
	this.Short("add missing and remove unused modules")
//line cmd/xgo/mod_tidy_cmd.gox:24:1
	this.FlagOff()
//line cmd/xgo/mod_tidy_cmd.gox:26:1
	this.Run__1(func(args []string) {
//line cmd/xgo/mod_tidy_cmd.gox:27:1
		mod.CmdTidy.Run(mod.CmdTidy, args)
	})
}
func (this *Cmd_mod_tidy) Classfname() string {
	return "mod_tidy"
}

//line cmd/xgo/run_cmd.gox:20
func (this *Cmd_run) Main(_xgo_arg0 string) {
	this.Command.Main(_xgo_arg0)
//line cmd/xgo/run_cmd.gox:20:1
	this.Use("run [flags] package [arguments...]")
//line cmd/xgo/run_cmd.gox:22:1
	this.Short("Compile and run an XGo program")
//line cmd/xgo/run_cmd.gox:24:1
	this.FlagOff()
//line cmd/xgo/run_cmd.gox:26:1
	this.Run__1(func(args []string) {
//line cmd/xgo/run_cmd.gox:27:1
		run.Cmd.Run(run.Cmd, args)
	})
}
func (this *Cmd_run) Classfname() string {
	return "run"
}

//line cmd/xgo/serve_cmd.gox:20
func (this *Cmd_serve) Main(_xgo_arg0 string) {
	this.Command.Main(_xgo_arg0)
//line cmd/xgo/serve_cmd.gox:20:1
	this.Use("serve [flags]")
//line cmd/xgo/serve_cmd.gox:22:1
	this.Short("Serve as an XGo LangServer")
//line cmd/xgo/serve_cmd.gox:24:1
	this.FlagOff()
//line cmd/xgo/serve_cmd.gox:26:1
	this.Run__1(func(args []string) {
//line cmd/xgo/serve_cmd.gox:27:1
		serve.Cmd.Run(serve.Cmd, args)
	})
}
func (this *Cmd_serve) Classfname() string {
	return "serve"
}

//line cmd/xgo/test_cmd.gox:20
func (this *Cmd_test) Main(_xgo_arg0 string) {
	this.Command.Main(_xgo_arg0)
//line cmd/xgo/test_cmd.gox:20:1
	this.Use("test [flags] [packages]")
//line cmd/xgo/test_cmd.gox:22:1
	this.Short("Test XGo packages")
//line cmd/xgo/test_cmd.gox:24:1
	this.FlagOff()
//line cmd/xgo/test_cmd.gox:26:1
	this.Run__1(func(args []string) {
//line cmd/xgo/test_cmd.gox:27:1
		test.Cmd.Run(test.Cmd, args)
	})
}
func (this *Cmd_test) Classfname() string {
	return "test"
}

//line cmd/xgo/version_cmd.gox:21
func (this *Cmd_version) Main(_xgo_arg0 string) {
	this.Command.Main(_xgo_arg0)
//line cmd/xgo/version_cmd.gox:21:1
	this.Use("version [flags]")
//line cmd/xgo/version_cmd.gox:23:1
	this.Short("Print XGo version")
//line cmd/xgo/version_cmd.gox:25:1
	this.Run__0(func() {
//line cmd/xgo/version_cmd.gox:26:1
		fmt.Println(stringutil.Concat("xgo ", env1.Version(), " ", runtime.GOOS, "/", runtime.GOARCH))
	})
}
func (this *Cmd_version) Classfname() string {
	return "version"
}

//line cmd/xgo/watch_cmd.gox:20
func (this *Cmd_watch) Main(_xgo_arg0 string) {
	this.Command.Main(_xgo_arg0)
//line cmd/xgo/watch_cmd.gox:20:1
	this.Use("watch [flags] [dir]")
//line cmd/xgo/watch_cmd.gox:22:1
	this.Short("Monitor code changes in an XGo workspace to generate Go files")
//line cmd/xgo/watch_cmd.gox:24:1
	this.FlagOff()
//line cmd/xgo/watch_cmd.gox:26:1
	this.Run__1(func(args []string) {
//line cmd/xgo/watch_cmd.gox:27:1
		watch.Cmd.Run(watch.Cmd, args)
	})
}
func (this *Cmd_watch) Classfname() string {
	return "watch"
}
func main() {
	new(App).Main()
}
