Skip to content

Commit ed16c2a

Browse files
committed
提交
1 parent 3f2e86b commit ed16c2a

File tree

6 files changed

+62
-33
lines changed

6 files changed

+62
-33
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ require (
2020
github.com/shopspring/decimal v1.4.0
2121
github.com/tealeg/xlsx/v3 v3.3.10
2222
github.com/team-ide/cron v1.0.1
23-
github.com/team-ide/go-dialect v1.9.23
23+
github.com/team-ide/go-dialect v1.9.24
2424
github.com/team-ide/go-driver v1.3.4
2525
github.com/team-ide/go-interpreter v0.1.2
2626
go.mongodb.org/mongo-driver v1.17.1

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ github.com/tealeg/xlsx/v3 v3.3.10 h1:hz4MO213nguwiz69QI6MkbYWcqhC3tEnXsBf2Eaqtog
213213
github.com/tealeg/xlsx/v3 v3.3.10/go.mod h1:KV4FTFtvGy0TBlOivJLZu/YNZk6e0Qtk7eOSglWksuA=
214214
github.com/team-ide/cron v1.0.1 h1:CrkjAOsS76g76ZsFOTBCZpzjm9GlUxwfPv85vq4vmZQ=
215215
github.com/team-ide/cron v1.0.1/go.mod h1:0o4pG9buGit9ZDS6CeKyUcMG95HErba2edMMyXE+i2A=
216-
github.com/team-ide/go-dialect v1.9.23 h1:uwTwCkILSBXWvjOBsq2zDJNBg9TkK206kuW9uvN/c48=
217-
github.com/team-ide/go-dialect v1.9.23/go.mod h1:2k0TuEO4eyzDhAln6P3fteEIPYD6rh992T9kgIKuxaU=
216+
github.com/team-ide/go-dialect v1.9.24 h1:lCzK+OophqCs4pBOtoTntc38MD2vQEVQpK7U63lZnHA=
217+
github.com/team-ide/go-dialect v1.9.24/go.mod h1:2k0TuEO4eyzDhAln6P3fteEIPYD6rh992T9kgIKuxaU=
218218
github.com/team-ide/go-driver v1.3.4 h1:FXlX2KmeV0zGlk4QGEg+ECjcN/BX1I9zYDF6DnSfFjQ=
219219
github.com/team-ide/go-driver v1.3.4/go.mod h1:UhcuTAQRnvBUZXJeOA06eGJDeTqScJyfhyjpyzh3lxg=
220220
github.com/team-ide/go-interpreter v0.1.2 h1:m2C973+Wmp0GJ8khjZJfTjDCs9uRKCnMjm7is6+UkUo=

javascript/func_util.go

+10
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,16 @@ StrPadRight("xx", 5, "0") 右侧补”0“达到5位长度`,
480480
Comment: `去除 所有 匹配的 后缀`,
481481
Func: util.TrimRight,
482482
},
483+
{
484+
Name: "stringJoin",
485+
Comment: `字符串拼接`,
486+
Func: util.StringJoin,
487+
},
488+
{
489+
Name: "anyJoin",
490+
Comment: `任意切片拼接`,
491+
Func: util.AnyJoin,
492+
},
483493
{
484494
Name: "getNow",
485495
Comment: `获取当前时间

main.go

+29-29
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,35 @@ package main
22

33
import (
44
"fmt"
5-
_ "github.com/team-ide/go-dialect/dialect"
6-
_ "github.com/team-ide/go-dialect/worker"
7-
_ "github.com/team-ide/go-tool/api_baidu"
8-
_ "github.com/team-ide/go-tool/api_github"
9-
_ "github.com/team-ide/go-tool/data_engine"
10-
_ "github.com/team-ide/go-tool/datamove"
11-
_ "github.com/team-ide/go-tool/db"
12-
_ "github.com/team-ide/go-tool/db/db_type_dm"
13-
_ "github.com/team-ide/go-tool/db/db_type_gbase"
14-
_ "github.com/team-ide/go-tool/db/db_type_kingbase"
15-
_ "github.com/team-ide/go-tool/db/db_type_mysql"
16-
_ "github.com/team-ide/go-tool/db/db_type_odbc"
17-
_ "github.com/team-ide/go-tool/db/db_type_opengauss"
18-
_ "github.com/team-ide/go-tool/db/db_type_oracle"
19-
_ "github.com/team-ide/go-tool/db/db_type_postgresql"
20-
_ "github.com/team-ide/go-tool/db/db_type_shentong"
21-
_ "github.com/team-ide/go-tool/db/db_type_sqlite"
22-
_ "github.com/team-ide/go-tool/elasticsearch"
23-
_ "github.com/team-ide/go-tool/javascript"
24-
_ "github.com/team-ide/go-tool/kafka"
25-
_ "github.com/team-ide/go-tool/metric"
26-
_ "github.com/team-ide/go-tool/mongodb"
27-
_ "github.com/team-ide/go-tool/qrcode"
28-
_ "github.com/team-ide/go-tool/redis"
29-
_ "github.com/team-ide/go-tool/task"
30-
_ "github.com/team-ide/go-tool/thrift"
31-
_ "github.com/team-ide/go-tool/util"
32-
_ "github.com/team-ide/go-tool/webproxy"
33-
_ "github.com/team-ide/go-tool/zookeeper"
5+
//_ "github.com/team-ide/go-dialect/dialect"
6+
//_ "github.com/team-ide/go-dialect/worker"
7+
//_ "github.com/team-ide/go-tool/api_baidu"
8+
//_ "github.com/team-ide/go-tool/api_github"
9+
//_ "github.com/team-ide/go-tool/data_engine"
10+
//_ "github.com/team-ide/go-tool/datamove"
11+
//_ "github.com/team-ide/go-tool/db"
12+
//_ "github.com/team-ide/go-tool/db/db_type_dm"
13+
//_ "github.com/team-ide/go-tool/db/db_type_gbase"
14+
//_ "github.com/team-ide/go-tool/db/db_type_kingbase"
15+
//_ "github.com/team-ide/go-tool/db/db_type_mysql"
16+
//_ "github.com/team-ide/go-tool/db/db_type_odbc"
17+
//_ "github.com/team-ide/go-tool/db/db_type_opengauss"
18+
//_ "github.com/team-ide/go-tool/db/db_type_oracle"
19+
//_ "github.com/team-ide/go-tool/db/db_type_postgresql"
20+
//_ "github.com/team-ide/go-tool/db/db_type_shentong"
21+
//_ "github.com/team-ide/go-tool/db/db_type_sqlite"
22+
//_ "github.com/team-ide/go-tool/elasticsearch"
23+
//_ "github.com/team-ide/go-tool/javascript"
24+
//_ "github.com/team-ide/go-tool/kafka"
25+
//_ "github.com/team-ide/go-tool/metric"
26+
//_ "github.com/team-ide/go-tool/mongodb"
27+
//_ "github.com/team-ide/go-tool/qrcode"
28+
//_ "github.com/team-ide/go-tool/redis"
29+
//_ "github.com/team-ide/go-tool/task"
30+
//_ "github.com/team-ide/go-tool/thrift"
31+
//_ "github.com/team-ide/go-tool/util"
32+
//_ "github.com/team-ide/go-tool/webproxy"
33+
//_ "github.com/team-ide/go-tool/zookeeper"
3434
)
3535

3636
func main() {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "1.2.31"
2+
"version": "1.2.32"
33
}

util/strings.go

+19
Original file line numberDiff line numberDiff line change
@@ -331,3 +331,22 @@ func TrimLeft(arg string, trim string) string {
331331
func TrimRight(arg string, trim string) string {
332332
return strings.TrimRight(arg, trim)
333333
}
334+
335+
// StringJoin 字符串拼接
336+
func StringJoin(es []string, sep string) string {
337+
return strings.Join(es, sep)
338+
}
339+
340+
// AnyJoin 任意切片拼接
341+
func AnyJoin(sep string, es ...any) (res string) {
342+
if len(es) == 0 {
343+
return
344+
}
345+
for i, e := range es {
346+
if i > 0 {
347+
res += sep
348+
}
349+
res += GetStringValue(e)
350+
}
351+
return
352+
}

0 commit comments

Comments
 (0)