cmd: llgo.next

This commit is contained in:
xushiwei
2025-05-04 14:04:43 +08:00
parent 158be3f949
commit cc08195cf2
4 changed files with 58 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
// Code generated by gop (Go+); DO NOT EDIT.
package main
import (
"fmt"
"github.com/goplus/cobra/xcmd"
"github.com/goplus/llgo/internal/env"
"github.com/qiniu/x/stringutil"
"runtime"
)
const _ = true
type version struct {
xcmd.Command
*App
}
type App struct {
xcmd.App
}
func (this *App) Main() {
_gop_obj0 := &version{App: this}
xcmd.Gopt_App_Main(this, _gop_obj0)
}
//line cmd/llgo/version_cmd.gox:7
func (this *version) Main(_gop_arg0 string) {
this.Command.Main(_gop_arg0)
//line cmd/llgo/version_cmd.gox:7:1
this.Short("print LLGo version")
//line cmd/llgo/version_cmd.gox:9:1
this.Run__0(func() {
//line cmd/llgo/version_cmd.gox:10: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:9:1
new(App).Main()
}

View File

@@ -0,0 +1,11 @@
import (
"runtime"
"github.com/goplus/llgo/internal/env"
)
short "print LLGo version"
run => {
echo "llgo ${env.version} ${runtime.GOOS}/${runtime.GOARCH}"
}