Repository: goplus/gop
Pull request #2347 (2025-05-08 01:50:54)

add usage for xgo

codecov[bot]: ## [Codecov](https://app.codecov.io/gh/goplus/gop/pull/2347?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goplus) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 92.59%. Comparing base [(`455ea43`)](https://app.codecov.io/gh/goplus/gop/commit/455ea430a3bb10fe30f1a1c09100d6a93b5f5bc7?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goplus) to head [(`47c09ea`)](https://app.codecov.io/gh/goplus/gop/commit/47c09ea035ac5ada7a1203cf4d67f7eb7775a3b5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goplus).

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##             main    #2347      +/-   ##
==========================================
- Coverage   92.62%   92.59%   -0.04%     
==========================================
  Files          34       32       -2     
  Lines       11320    11310      -10     
==========================================
- Hits        10485    10472      -13     
- Misses        677      679       +2     
- Partials      158      159       +1     
```

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/goplus/gop/pull/2347?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goplus).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goplus).

<details><summary> :rocket: New features to boost your workflow: </summary>

- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>

Patch:
diff --git a/cmd/xgo/bug_cmd.gox b/cmd/xgo/bug_cmd.gox
index e670a5eb..5beb7c7a 100644
--- a/cmd/xgo/bug_cmd.gox
+++ b/cmd/xgo/bug_cmd.gox
@@ -17,6 +17,8 @@ import (
 	self "github.com/goplus/gop/cmd/internal/bug"
 )
 
+use "bug"
+
 short "Start a bug report"
 
 flagOff
diff --git a/cmd/xgo/build_cmd.gox b/cmd/xgo/build_cmd.gox
index abc99b3b..83e615bd 100644
--- a/cmd/xgo/build_cmd.gox
+++ b/cmd/xgo/build_cmd.gox
@@ -17,6 +17,8 @@ import (
 	self "github.com/goplus/gop/cmd/internal/build"
 )
 
+use "build [flags] [packages]"
+
 short "Build Go+ files"
 
 flagOff
diff --git a/cmd/xgo/clean_cmd.gox b/cmd/xgo/clean_cmd.gox
index 308bfed3..cf9a9189 100644
--- a/cmd/xgo/clean_cmd.gox
+++ b/cmd/xgo/clean_cmd.gox
@@ -17,6 +17,8 @@ import (
 	self "github.com/goplus/gop/cmd/internal/clean"
 )
 
+use "clean [flags] <gopSrcDir>"
+
 short "Clean all Go+ auto generated files"
 
 flagOff
diff --git a/cmd/xgo/doc_cmd.gox b/cmd/xgo/doc_cmd.gox
index 5ec0c871..fd28b87d 100644
--- a/cmd/xgo/doc_cmd.gox
+++ b/cmd/xgo/doc_cmd.gox
@@ -17,6 +17,8 @@ import (
 	self "github.com/goplus/gop/cmd/internal/doc"
 )
 
+use "doc [flags] [pkgPath]"
+
 short "Show documentation for package or symbol"
 
 flagOff
diff --git a/cmd/xgo/env_cmd.gox b/cmd/xgo/env_cmd.gox
index 9131b3e6..3b41200b 100644
--- a/cmd/xgo/env_cmd.gox
+++ b/cmd/xgo/env_cmd.gox
@@ -17,6 +17,8 @@ import (
 	self "github.com/goplus/gop/cmd/internal/env"
 )
 
+use "env [flags] [var ...]"
+
 short "Prints Go+ environment information"
 
 flagOff
diff --git a/cmd/xgo/fmt_cmd.gox b/cmd/xgo/fmt_cmd.gox
index 7d6fc49e..e4475c0b 100644
--- a/cmd/xgo/fmt_cmd.gox
+++ b/cmd/xgo/fmt_cmd.gox
@@ -17,6 +17,8 @@ import (
 	self "github.com/goplus/gop/cmd/internal/gopfmt"
 )
 
+use "fmt [flags] path ..."
+
 short "Format Go+ packages"
 
 flagOff
diff --git a/cmd/xgo/get_cmd.gox b/cmd/xgo/get_cmd.gox
index cd7ed6e8..37a74482 100644
--- a/cmd/xgo/get_cmd.gox
+++ b/cmd/xgo/get_cmd.gox
@@ -17,6 +17,8 @@ import (
 	self "github.com/goplus/gop/cmd/internal/gopget"
 )
 
+use "get [flags] [packages]"
+
 short "Add dependencies to current module and install them"
 
 flagOff
diff --git a/cmd/xgo/go_cmd.gox b/cmd/xgo/go_cmd.gox
index 0767d7ed..124dff96 100644
--- a/cmd/xgo/go_cmd.gox
+++ b/cmd/xgo/go_cmd.gox
@@ -17,6 +17,8 @@ import (
 	self "github.com/goplus/gop/cmd/internal/gengo"
 )
 
+use "go [flags] [packages|files]"
+
 short "Convert Go+ code into Go code"
 
 flagOff
diff --git a/cmd/xgo/gop_autogen.go b/cmd/xgo/gop_autogen.go
index 1fe66c4b..02de7325 100644
--- a/cmd/xgo/gop_autogen.go
+++ b/cmd/xgo/gop_autogen.go
@@ -3,24 +3,24 @@
 package main
 
 import (
-	fmt1 "fmt"
+	"fmt"
 	"github.com/goplus/cobra/xcmd"
 	"github.com/goplus/gogen"
-	bug1 "github.com/goplus/gop/cmd/internal/bug"
-	build1 "github.com/goplus/gop/cmd/internal/build"
-	clean1 "github.com/goplus/gop/cmd/internal/clean"
-	doc1 "github.com/goplus/gop/cmd/internal/doc"
-	env1 "github.com/goplus/gop/cmd/internal/env"
+	"github.com/goplus/gop/cmd/internal/bug"
+	"github.com/goplus/gop/cmd/internal/build"
+	"github.com/goplus/gop/cmd/internal/clean"
+	"github.com/goplus/gop/cmd/internal/doc"
+	"github.com/goplus/gop/cmd/internal/env"
 	"github.com/goplus/gop/cmd/internal/gengo"
 	"github.com/goplus/gop/cmd/internal/gopfmt"
 	"github.com/goplus/gop/cmd/internal/gopget"
-	install1 "github.com/goplus/gop/cmd/internal/install"
-	mod1 "github.com/goplus/gop/cmd/internal/mod"
-	run1 "github.com/goplus/gop/cmd/internal/run"
-	serve1 "github.com/goplus/gop/cmd/internal/serve"
-	test1 "github.com/goplus/gop/cmd/internal/test"
-	watch1 "github.com/goplus/gop/cmd/internal/watch"
-	env2 "github.com/goplus/gop/env"
+	"github.com/goplus/gop/cmd/internal/install"
+	"github.com/goplus/gop/cmd/internal/mod"
+	"github.com/goplus/gop/cmd/internal/run"
+	"github.com/goplus/gop/cmd/internal/serve"
+	"github.com/goplus/gop/cmd/internal/test"
+	"github.com/goplus/gop/cmd/internal/watch"
+	env1 "github.com/goplus/gop/env"
 	"github.com/qiniu/x/log"
 	"github.com/qiniu/x/stringutil"
 	"runtime"
@@ -28,78 +28,78 @@ import (
 
 const _ = true
 
-type bug struct {
+type Cmd_bug struct {
 	xcmd.Command
 	*App
 }
-type build struct {
+type Cmd_build struct {
 	xcmd.Command
 	*App
 }
-type clean struct {
+type Cmd_clean struct {
 	xcmd.Command
 	*App
 }
-type doc struct {
+type Cmd_doc struct {
 	xcmd.Command
 	*App
 }
-type env struct {
+type Cmd_env struct {
 	xcmd.Command
 	*App
 }
-type fmt struct {
+type Cmd_fmt struct {
 	xcmd.Command
 	*App
 }
-type get struct {
+type Cmd_get struct {
 	xcmd.Command
 	*App
 }
-type _go struct {
+type Cmd_go struct {
 	xcmd.Command
 	*App
 }
-type install struct {
+type Cmd_install struct {
 	xcmd.Command
 	*App
 }
 type App struct {
 	xcmd.App
 }
-type mod struct {
+type Cmd_mod struct {
 	xcmd.Command
 	*App
 }
-type mod_download struct {
+type Cmd_mod_download struct {
 	xcmd.Command
 	*App
 }
-type mod_init struct {
+type Cmd_mod_init struct {
 	xcmd.Command
 	*App
 }
-type mod_tidy struct {
+type Cmd_mod_tidy struct {
 	xcmd.Command
 	*App
 }
-type run struct {
+type Cmd_run struct {
 	xcmd.Command
 	*App
 }
-type serve struct {
+type Cmd_serve struct {
 	xcmd.Command
 	*App
 }
-type test struct {
+type Cmd_test struct {
 	xcmd.Command
 	*App
 }
-type version struct {
+type Cmd_version struct {
 	xcmd.Command
 	*App
 }
-type watch struct {
+type Cmd_watch struct {
 	xcmd.Command
 	*App
 }
@@ -113,322 +113,358 @@ func (this *App) MainEntry() {
 	gogen.GeneratedHeader = "// Code generated by xgo (xGo); DO NOT EDIT.\n\n"
 }
 func (this *App) Main() {
-	_gop_obj0 := &bug{App: this}
-	_gop_obj1 := &build{App: this}
-	_gop_obj2 := &clean{App: this}
-	_gop_obj3 := &doc{App: this}
-	_gop_obj4 := &env{App: this}
-	_gop_obj5 := &fmt{App: this}
-	_gop_obj6 := &get{App: this}
-	_gop_obj7 := &_go{App: this}
-	_gop_obj8 := &install{App: this}
-	_gop_obj9 := &mod{App: this}
-	_gop_obj10 := &mod_download{App: this}
-	_gop_obj11 := &mod_init{App: this}
-	_gop_obj12 := &mod_tidy{App: this}
-	_gop_obj13 := &run{App: this}
-	_gop_obj14 := &serve{App: this}
-	_gop_obj15 := &test{App: this}
-	_gop_obj16 := &version{App: this}
-	_gop_obj17 := &watch{App: this}
+	_gop_obj0 := &Cmd_bug{App: this}
+	_gop_obj1 := &Cmd_build{App: this}
+	_gop_obj2 := &Cmd_clean{App: this}
+	_gop_obj3 := &Cmd_doc{App: this}
+	_gop_obj4 := &Cmd_env{App: this}
+	_gop_obj5 := &Cmd_fmt{App: this}
+	_gop_obj6 := &Cmd_get{App: this}
+	_gop_obj7 := &Cmd_go{App: this}
+	_gop_obj8 := &Cmd_install{App: this}
+	_gop_obj9 := &Cmd_mod{App: this}
+	_gop_obj10 := &Cmd_mod_download{App: this}
+	_gop_obj11 := &Cmd_mod_init{App: this}
+	_gop_obj12 := &Cmd_mod_tidy{App: this}
+	_gop_obj13 := &Cmd_run{App: this}
+	_gop_obj14 := &Cmd_serve{App: this}
+	_gop_obj15 := &Cmd_test{App: this}
+	_gop_obj16 := &Cmd_version{App: this}
+	_gop_obj17 := &Cmd_watch{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, _gop_obj10, _gop_obj11, _gop_obj12, _gop_obj13, _gop_obj14, _gop_obj15, _gop_obj16, _gop_obj17)
 }
 //line cmd/xgo/bug_cmd.gox:20
-func (this *bug) Main(_gop_arg0 string) {
+func (this *Cmd_bug) Main(_gop_arg0 string) {
 	this.Command.Main(_gop_arg0)
 //line cmd/xgo/bug_cmd.gox:20:1
-	this.Short("Start a bug report")
+	this.Use("bug")
 //line cmd/xgo/bug_cmd.gox:22:1
-	this.FlagOff()
+	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:25:1
-		bug1.Cmd.Run(bug1.Cmd, args)
+//line cmd/xgo/bug_cmd.gox:27:1
+		bug.Cmd.Run(bug.Cmd, args)
 	})
 }
-func (this *bug) Classfname() string {
+func (this *Cmd_bug) Classfname() string {
 	return "bug"
 }
 //line cmd/xgo/build_cmd.gox:20
-func (this *build) Main(_gop_arg0 string) {
+func (this *Cmd_build) Main(_gop_arg0 string) {
 	this.Command.Main(_gop_arg0)
 //line cmd/xgo/build_cmd.gox:20:1
-	this.Short("Build Go+ files")
+	this.Use("build [flags] [packages]")
 //line cmd/xgo/build_cmd.gox:22:1
-	this.FlagOff()
+	this.Short("Build Go+ 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:25:1
-		build1.Cmd.Run(build1.Cmd, args)
+//line cmd/xgo/build_cmd.gox:27:1
+		build.Cmd.Run(build.Cmd, args)
 	})
 }
-func (this *build) Classfname() string {
+func (this *Cmd_build) Classfname() string {
 	return "build"
 }
 //line cmd/xgo/clean_cmd.gox:20
-func (this *clean) Main(_gop_arg0 string) {
+func (this *Cmd_clean) Main(_gop_arg0 string) {
 	this.Command.Main(_gop_arg0)
 //line cmd/xgo/clean_cmd.gox:20:1
-	this.Short("Clean all Go+ auto generated files")
+	this.Use("clean [flags] <gopSrcDir>")
 //line cmd/xgo/clean_cmd.gox:22:1
-	this.FlagOff()
+	this.Short("Clean all Go+ 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:25:1
-		clean1.Cmd.Run(clean1.Cmd, args)
+//line cmd/xgo/clean_cmd.gox:27:1
+		clean.Cmd.Run(clean.Cmd, args)
 	})
 }
-func (this *clean) Classfname() string {
+func (this *Cmd_clean) Classfname() string {
 	return "clean"
 }
 //line cmd/xgo/doc_cmd.gox:20
-func (this *doc) Main(_gop_arg0 string) {
+func (this *Cmd_doc) Main(_gop_arg0 string) {
 	this.Command.Main(_gop_arg0)
 //line cmd/xgo/doc_cmd.gox:20:1
-	this.Short("Show documentation for package or symbol")
+	this.Use("doc [flags] [pkgPath]")
 //line cmd/xgo/doc_cmd.gox:22:1
-	this.FlagOff()
+	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:25:1
-		doc1.Cmd.Run(doc1.Cmd, args)
+//line cmd/xgo/doc_cmd.gox:27:1
+		doc.Cmd.Run(doc.Cmd, args)
 	})
 }
-func (this *doc) Classfname() string {
+func (this *Cmd_doc) Classfname() string {
 	return "doc"
 }
 //line cmd/xgo/env_cmd.gox:20
-func (this *env) Main(_gop_arg0 string) {
+func (this *Cmd_env) Main(_gop_arg0 string) {
 	this.Command.Main(_gop_arg0)
 //line cmd/xgo/env_cmd.gox:20:1
-	this.Short("Prints Go+ environment information")
+	this.Use("env [flags] [var ...]")
 //line cmd/xgo/env_cmd.gox:22:1
-	this.FlagOff()
+	this.Short("Prints Go+ 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:25:1
-		env1.Cmd.Run(env1.Cmd, args)
+//line cmd/xgo/env_cmd.gox:27:1
+		env.Cmd.Run(env.Cmd, args)
 	})
 }
-func (this *env) Classfname() string {
+func (this *Cmd_env) Classfname() string {
 	return "env"
 }
 //line cmd/xgo/fmt_cmd.gox:20
-func (this *fmt) Main(_gop_arg0 string) {
+func (this *Cmd_fmt) Main(_gop_arg0 string) {
 	this.Command.Main(_gop_arg0)
 //line cmd/xgo/fmt_cmd.gox:20:1
-	this.Short("Format Go+ packages")
+	this.Use("fmt [flags] path ...")
 //line cmd/xgo/fmt_cmd.gox:22:1
-	this.FlagOff()
+	this.Short("Format Go+ 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:25:1
+//line cmd/xgo/fmt_cmd.gox:27:1
 		gopfmt.Cmd.Run(gopfmt.Cmd, args)
 	})
 }
-func (this *fmt) Classfname() string {
+func (this *Cmd_fmt) Classfname() string {
 	return "fmt"
 }
 //line cmd/xgo/get_cmd.gox:20
-func (this *get) Main(_gop_arg0 string) {
+func (this *Cmd_get) Main(_gop_arg0 string) {
 	this.Command.Main(_gop_arg0)
 //line cmd/xgo/get_cmd.gox:20:1
-	this.Short("Add dependencies to current module and install them")
+	this.Use("get [flags] [packages]")
 //line cmd/xgo/get_cmd.gox:22:1
-	this.FlagOff()
+	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:25:1
+//line cmd/xgo/get_cmd.gox:27:1
 		gopget.Cmd.Run(gopget.Cmd, args)
 	})
 }
-func (this *get) Classfname() string {
+func (this *Cmd_get) Classfname() string {
 	return "get"
 }
 //line cmd/xgo/go_cmd.gox:20
-func (this *_go) Main(_gop_arg0 string) {
+func (this *Cmd_go) Main(_gop_arg0 string) {
 	this.Command.Main(_gop_arg0)
 //line cmd/xgo/go_cmd.gox:20:1
-	this.Short("Convert Go+ code into Go code")
+	this.Use("go [flags] [packages|files]")
 //line cmd/xgo/go_cmd.gox:22:1
-	this.FlagOff()
+	this.Short("Convert Go+ 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:25:1
+//line cmd/xgo/go_cmd.gox:27:1
 		gengo.Cmd.Run(gengo.Cmd, args)
 	})
 }
-func (this *_go) Classfname() string {
+func (this *Cmd_go) Classfname() string {
 	return "go"
 }
 //line cmd/xgo/install_cmd.gox:20
-func (this *install) Main(_gop_arg0 string) {
+func (this *Cmd_install) Main(_gop_arg0 string) {
 	this.Command.Main(_gop_arg0)
 //line cmd/xgo/install_cmd.gox:20:1
-	this.Short("Build Go+ files and install target to GOBIN")
+	this.Use("install [flags] [packages]")
 //line cmd/xgo/install_cmd.gox:22:1
-	this.FlagOff()
+	this.Short("Build Go+ 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:25:1
-		install1.Cmd.Run(install1.Cmd, args)
+//line cmd/xgo/install_cmd.gox:27:1
+		install.Cmd.Run(install.Cmd, args)
 	})
 }
-func (this *install) Classfname() string {
+func (this *Cmd_install) Classfname() string {
 	return "install"
 }
 //line cmd/xgo/mod_cmd.gox:20
-func (this *mod) Main(_gop_arg0 string) {
+func (this *Cmd_mod) Main(_gop_arg0 string) {
 	this.Command.Main(_gop_arg0)
 //line cmd/xgo/mod_cmd.gox:20:1
-	this.Short("Module maintenance")
+	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:23:1
+//line cmd/xgo/mod_cmd.gox:25:1
 		this.Help()
 	})
 }
-func (this *mod) Classfname() string {
+func (this *Cmd_mod) Classfname() string {
 	return "mod"
 }
 //line cmd/xgo/mod_download_cmd.gox:20
-func (this *mod_download) Main(_gop_arg0 string) {
+func (this *Cmd_mod_download) Main(_gop_arg0 string) {
 	this.Command.Main(_gop_arg0)
 //line cmd/xgo/mod_download_cmd.gox:20:1
-	this.Short("download modules to local cache")
+	this.Use("download [flags] [modules]")
 //line cmd/xgo/mod_download_cmd.gox:22:1
-	this.FlagOff()
+	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:25:1
+//line cmd/xgo/mod_download_cmd.gox:27:1
 		if len(args) < 1 {
-//line cmd/xgo/mod_download_cmd.gox:26:1
+//line cmd/xgo/mod_download_cmd.gox:28:1
 			this.Help()
-//line cmd/xgo/mod_download_cmd.gox:27:1
+//line cmd/xgo/mod_download_cmd.gox:29:1
 			return
 		}
-//line cmd/xgo/mod_download_cmd.gox:29:1
-		mod1.CmdDownload.Run(mod1.CmdDownload, args)
+//line cmd/xgo/mod_download_cmd.gox:31:1
+		mod.CmdDownload.Run(mod.CmdDownload, args)
 	})
 }
-func (this *mod_download) Classfname() string {
+func (this *Cmd_mod_download) Classfname() string {
 	return "mod_download"
 }
 //line cmd/xgo/mod_init_cmd.gox:20
-func (this *mod_init) Main(_gop_arg0 string) {
+func (this *Cmd_mod_init) Main(_gop_arg0 string) {
 	this.Command.Main(_gop_arg0)
 //line cmd/xgo/mod_init_cmd.gox:20:1
-	this.Short("initialize new module in current directory")
+	this.Use("init [flags] module-path")
 //line cmd/xgo/mod_init_cmd.gox:22:1
-	this.FlagOff()
+	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:25:1
+//line cmd/xgo/mod_init_cmd.gox:27:1
 		if len(args) < 1 {
-//line cmd/xgo/mod_init_cmd.gox:26:1
+//line cmd/xgo/mod_init_cmd.gox:28:1
 			this.Help()
-//line cmd/xgo/mod_init_cmd.gox:27:1
+//line cmd/xgo/mod_init_cmd.gox:29:1
 			return
 		}
-//line cmd/xgo/mod_init_cmd.gox:29:1
-		mod1.CmdInit.Run(mod1.CmdInit, args)
+//line cmd/xgo/mod_init_cmd.gox:31:1
+		mod.CmdInit.Run(mod.CmdInit, args)
 	})
 }
-func (this *mod_init) Classfname() string {
+func (this *Cmd_mod_init) Classfname() string {
 	return "mod_init"
 }
 //line cmd/xgo/mod_tidy_cmd.gox:20
-func (this *mod_tidy) Main(_gop_arg0 string) {
+func (this *Cmd_mod_tidy) Main(_gop_arg0 string) {
 	this.Command.Main(_gop_arg0)
 //line cmd/xgo/mod_tidy_cmd.gox:20:1
-	this.Short("add missing and remove unused modules")
+	this.Use("tidy [flags]")
 //line cmd/xgo/mod_tidy_cmd.gox:22:1
-	this.FlagOff()
+	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:25:1
-		mod1.CmdTidy.Run(mod1.CmdTidy, args)
+//line cmd/xgo/mod_tidy_cmd.gox:27:1
+		mod.CmdTidy.Run(mod.CmdTidy, args)
 	})
 }
-func (this *mod_tidy) Classfname() string {
+func (this *Cmd_mod_tidy) Classfname() string {
 	return "mod_tidy"
 }
 //line cmd/xgo/run_cmd.gox:20
-func (this *run) Main(_gop_arg0 string) {
+func (this *Cmd_run) Main(_gop_arg0 string) {
 	this.Command.Main(_gop_arg0)
 //line cmd/xgo/run_cmd.gox:20:1
-	this.Short("Compile and run a Go+ program")
+	this.Use("run [flags] package [arguments...]")
 //line cmd/xgo/run_cmd.gox:22:1
-	this.FlagOff()
+	this.Short("Compile and run a Go+ 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:25:1
-		run1.Cmd.Run(run1.Cmd, args)
+//line cmd/xgo/run_cmd.gox:27:1
+		run.Cmd.Run(run.Cmd, args)
 	})
 }
-func (this *run) Classfname() string {
+func (this *Cmd_run) Classfname() string {
 	return "run"
 }
 //line cmd/xgo/serve_cmd.gox:20
-func (this *serve) Main(_gop_arg0 string) {
+func (this *Cmd_serve) Main(_gop_arg0 string) {
 	this.Command.Main(_gop_arg0)
 //line cmd/xgo/serve_cmd.gox:20:1
-	this.Short("Serve as a Go+ LangServer")
+	this.Use("serve [flags]")
 //line cmd/xgo/serve_cmd.gox:22:1
-	this.FlagOff()
+	this.Short("Serve as a Go+ 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:25:1
-		serve1.Cmd.Run(serve1.Cmd, args)
+//line cmd/xgo/serve_cmd.gox:27:1
+		serve.Cmd.Run(serve.Cmd, args)
 	})
 }
-func (this *serve) Classfname() string {
+func (this *Cmd_serve) Classfname() string {
 	return "serve"
 }
 //line cmd/xgo/test_cmd.gox:20
-func (this *test) Main(_gop_arg0 string) {
+func (this *Cmd_test) Main(_gop_arg0 string) {
 	this.Command.Main(_gop_arg0)
 //line cmd/xgo/test_cmd.gox:20:1
-	this.Short("Test Go+ packages")
+	this.Use("test [flags] [packages]")
 //line cmd/xgo/test_cmd.gox:22:1
-	this.FlagOff()
+	this.Short("Test Go+ 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:25:1
-		test1.Cmd.Run(test1.Cmd, args)
+//line cmd/xgo/test_cmd.gox:27:1
+		test.Cmd.Run(test.Cmd, args)
 	})
 }
-func (this *test) Classfname() string {
+func (this *Cmd_test) Classfname() string {
 	return "test"
 }
 //line cmd/xgo/version_cmd.gox:21
-func (this *version) Main(_gop_arg0 string) {
+func (this *Cmd_version) Main(_gop_arg0 string) {
 	this.Command.Main(_gop_arg0)
 //line cmd/xgo/version_cmd.gox:21:1
-	this.Short("Print Go+ version")
+	this.Use("version [flags]")
 //line cmd/xgo/version_cmd.gox:23:1
+	this.Short("Print Go+ version")
+//line cmd/xgo/version_cmd.gox:25:1
 	this.Run__0(func() {
-//line cmd/xgo/version_cmd.gox:24:1
-		fmt1.Println(stringutil.Concat("xgo ", env2.Version(), " ", runtime.GOOS, "/", runtime.GOARCH))
+//line cmd/xgo/version_cmd.gox:26:1
+		fmt.Println(stringutil.Concat("xgo ", env1.Version(), " ", runtime.GOOS, "/", runtime.GOARCH))
 	})
 }
-func (this *version) Classfname() string {
+func (this *Cmd_version) Classfname() string {
 	return "version"
 }
 //line cmd/xgo/watch_cmd.gox:20
-func (this *watch) Main(_gop_arg0 string) {
+func (this *Cmd_watch) Main(_gop_arg0 string) {
 	this.Command.Main(_gop_arg0)
 //line cmd/xgo/watch_cmd.gox:20:1
-	this.Short("Monitor code changes in a Go+ workspace to generate Go files")
+	this.Use("watch [flags] [dir]")
 //line cmd/xgo/watch_cmd.gox:22:1
-	this.FlagOff()
+	this.Short("Monitor code changes in a Go+ 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:25:1
-		watch1.Cmd.Run(watch1.Cmd, args)
+//line cmd/xgo/watch_cmd.gox:27:1
+		watch.Cmd.Run(watch.Cmd, args)
 	})
 }
-func (this *watch) Classfname() string {
+func (this *Cmd_watch) Classfname() string {
 	return "watch"
 }
 func main() {
diff --git a/cmd/xgo/install_cmd.gox b/cmd/xgo/install_cmd.gox
index 3c0541ef..e86e03a7 100644
--- a/cmd/xgo/install_cmd.gox
+++ b/cmd/xgo/install_cmd.gox
@@ -17,6 +17,8 @@ import (
 	self "github.com/goplus/gop/cmd/internal/install"
 )
 
+use "install [flags] [packages]"
+
 short "Build Go+ files and install target to GOBIN"
 
 flagOff
diff --git a/cmd/xgo/mod_cmd.gox b/cmd/xgo/mod_cmd.gox
index 40005530..fde9ae57 100644
--- a/cmd/xgo/mod_cmd.gox
+++ b/cmd/xgo/mod_cmd.gox
@@ -17,6 +17,8 @@ import (
 	self "github.com/goplus/gop/cmd/internal/mod"
 )
 
+use "mod"
+
 short "Module maintenance"
 
 run => {
diff --git a/cmd/xgo/mod_download_cmd.gox b/cmd/xgo/mod_download_cmd.gox
index 6ccd1805..b0cedd99 100644
--- a/cmd/xgo/mod_download_cmd.gox
+++ b/cmd/xgo/mod_download_cmd.gox
@@ -17,6 +17,8 @@ import (
 	self "github.com/goplus/gop/cmd/internal/mod"
 )
 
+use "download [flags] [modules]"
+
 short "download modules to local cache"
 
 flagOff
diff --git a/cmd/xgo/mod_init_cmd.gox b/cmd/xgo/mod_init_cmd.gox
index ef41795c..ce8aff76 100644
--- a/cmd/xgo/mod_init_cmd.gox
+++ b/cmd/xgo/mod_init_cmd.gox
@@ -17,6 +17,8 @@ import (
 	self "github.com/goplus/gop/cmd/internal/mod"
 )
 
+use "init [flags] module-path"
+
 short "initialize new module in current directory"
 
 flagOff
diff --git a/cmd/xgo/mod_tidy_cmd.gox b/cmd/xgo/mod_tidy_cmd.gox
index 497cb45e..5e845fb5 100644
--- a/cmd/xgo/mod_tidy_cmd.gox
+++ b/cmd/xgo/mod_tidy_cmd.gox
@@ -17,6 +17,8 @@ import (
 	self "github.com/goplus/gop/cmd/internal/mod"
 )
 
+use "tidy [flags]"
+
 short "add missing and remove unused modules"
 
 flagOff
diff --git a/cmd/xgo/run_cmd.gox b/cmd/xgo/run_cmd.gox
index c50bb82c..b816126c 100644
--- a/cmd/xgo/run_cmd.gox
+++ b/cmd/xgo/run_cmd.gox
@@ -17,6 +17,8 @@ import (
 	self "github.com/goplus/gop/cmd/internal/run"
 )
 
+use "run [flags] package [arguments...]"
+
 short "Compile and run a Go+ program"
 
 flagOff
diff --git a/cmd/xgo/serve_cmd.gox b/cmd/xgo/serve_cmd.gox
index 2e3c2be1..2bb6815a 100644
--- a/cmd/xgo/serve_cmd.gox
+++ b/cmd/xgo/serve_cmd.gox
@@ -17,6 +17,8 @@ import (
 	self "github.com/goplus/gop/cmd/internal/serve"
 )
 
+use "serve [flags]"
+
 short "Serve as a Go+ LangServer"
 
 flagOff
diff --git a/cmd/xgo/version_cmd.gox b/cmd/xgo/version_cmd.gox
index 0e7d61ff..e63db27d 100644
--- a/cmd/xgo/version_cmd.gox
+++ b/cmd/xgo/version_cmd.gox
@@ -18,6 +18,8 @@ import (
 	"runtime"
 )
 
+use "version [flags]"
+
 short "Print Go+ version"
 
 run => {
diff --git a/cmd/xgo/watch_cmd.gox b/cmd/xgo/watch_cmd.gox
index 532107f1..5eb84692 100644
--- a/cmd/xgo/watch_cmd.gox
+++ b/cmd/xgo/watch_cmd.gox
@@ -17,6 +17,8 @@ import (
 	self "github.com/goplus/gop/cmd/internal/watch"
 )
 
+use "watch [flags] [dir]"
+
 short "Monitor code changes in a Go+ workspace to generate Go files"
 
 flagOff


Test patch:
diff --git a/cmd/xgo/test_cmd.gox b/cmd/xgo/test_cmd.gox
index 6e980462..348ba666 100644
--- a/cmd/xgo/test_cmd.gox
+++ b/cmd/xgo/test_cmd.gox
@@ -17,6 +17,8 @@ import (
 	self "github.com/goplus/gop/cmd/internal/test"
 )
 
+use "test [flags] [packages]"
+
 short "Test Go+ packages"
 
 flagOff