feat: update xgo.

This commit is contained in:
Andrey Parhomenko 2024-06-06 11:14:30 +05:00
parent cd6a9131c0
commit a88986a89e
4 changed files with 23 additions and 4 deletions

9
go.mod
View file

@ -1,5 +1,10 @@
module surdeus.su/util/bb module surdeus.su/util/bb
go 1.21.9 go 1.22.3
require surdeus.su/core/cli v0.0.2 require (
surdeus.su/core/cli v0.1.2
surdeus.su/core/xgo v0.1.0
)
require github.com/d5/tengo/v2 v2.17.0 // indirect

10
go.sum
View file

@ -1,2 +1,8 @@
surdeus.su/core/cli v0.0.2 h1:RdHHk3/Fhwxz9PjaE+vTlCuF9KmhrmNUb5y4oqulrYI= github.com/d5/tengo/v2 v2.17.0 h1:BWUN9NoJzw48jZKiYDXDIF3QrIVZRm1uV1gTzeZ2lqM=
surdeus.su/core/cli v0.0.2/go.mod h1:UKwCmcSX+x7XX9aF3gOaaAaJcJA3gtUmL4vdnM43+fM= github.com/d5/tengo/v2 v2.17.0/go.mod h1:XRGjEs5I9jYIKTxly6HCF8oiiilk5E/RYXOZ5b0DZC8=
surdeus.su/core/cli v0.1.2 h1:qPzjawqPyZsO4Z5SaA1u141recVE65yioA83Qs7Jecs=
surdeus.su/core/cli v0.1.2/go.mod h1:r9JtQz3aEJzpYzMaNUNQHJoYkoWKNPi047qhd5uGlmA=
surdeus.su/core/xgo v0.0.2 h1:ZwYugS9dBoT1CdfkUjaOFXTgal0CZgopsrP8ozTGfAc=
surdeus.su/core/xgo v0.0.2/go.mod h1:6C/AHbjfvAMvt3TOzLB4eIZ40eU3ahJXtdY+kr4yXoc=
surdeus.su/core/xgo v0.1.0 h1:kpH4my7rK+C6Kx9bG7BB95F3T+kx8+MQEvm/APRiyNY=
surdeus.su/core/xgo v0.1.0/go.mod h1:6C/AHbjfvAMvt3TOzLB4eIZ40eU3ahJXtdY+kr4yXoc=

View file

@ -26,6 +26,7 @@ import (
"surdeus.su/util/bb/tool/wc" "surdeus.su/util/bb/tool/wc"
"surdeus.su/util/bb/tool/whoami" "surdeus.su/util/bb/tool/whoami"
"surdeus.su/util/bb/tool/yes" "surdeus.su/util/bb/tool/yes"
xgotool "surdeus.su/core/xgo/xtool"
"os" "os"
) )
@ -119,6 +120,7 @@ var root = mtool.T("bb").Subs(
}).Desc( }).Desc(
"print all the environment variables", "print all the environment variables",
), ),
xgotool.Tool,
).Desc( ).Desc(
"not POSIX compatible BusyBox utilities", "not POSIX compatible BusyBox utilities",
) )

6
xgo_test.xgo Normal file
View file

@ -0,0 +1,6 @@
fmt := import("fmt")
fmt.println("Hello, World!")
for _, i in [15, 573, 53] {
fmt.println(i)
}