Skip to content

Commit

Permalink
Merge pull request #264 from wubin1989/main
Browse files Browse the repository at this point in the history
...
  • Loading branch information
wubin1989 authored Oct 13, 2024
2 parents b6f4ae1 + 49a2c24 commit 4401977
Show file tree
Hide file tree
Showing 561 changed files with 444 additions and 86,090 deletions.
6 changes: 3 additions & 3 deletions cmd/crud.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/svc"
"github.com/unionj-cloud/go-doudou/v2/toolkit/pathutils"
v3 "github.com/unionj-cloud/go-doudou/v2/toolkit/protobuf/v3"
"github.com/unionj-cloud/go-doudou/v2/toolkit/stringutils"
"github.com/unionj-cloud/toolkit/pathutils"
v3 "github.com/unionj-cloud/toolkit/protobuf/v3"
"github.com/unionj-cloud/toolkit/stringutils"
)

var dbDriver string
Expand Down
8 changes: 4 additions & 4 deletions cmd/ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"github.com/spf13/cobra"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/config"
"github.com/unionj-cloud/go-doudou/v2/toolkit/dotenv"
"github.com/unionj-cloud/go-doudou/v2/toolkit/envconfig"
"github.com/unionj-cloud/go-doudou/v2/toolkit/pathutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/yaml"
"github.com/unionj-cloud/toolkit/dotenv"
"github.com/unionj-cloud/toolkit/envconfig"
"github.com/unionj-cloud/toolkit/pathutils"
"github.com/unionj-cloud/toolkit/yaml"
)

var dir string
Expand Down
2 changes: 1 addition & 1 deletion cmd/ddl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/spf13/cobra"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/svc"
"github.com/unionj-cloud/go-doudou/v2/toolkit/pathutils"
"github.com/unionj-cloud/toolkit/pathutils"
)

var testDir string
Expand Down
2 changes: 1 addition & 1 deletion cmd/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"github.com/iancoleman/strcase"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/svc"
v3 "github.com/unionj-cloud/go-doudou/v2/toolkit/protobuf/v3"
v3 "github.com/unionj-cloud/toolkit/protobuf/v3"

"github.com/spf13/cobra"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/svc"
"github.com/unionj-cloud/go-doudou/v2/toolkit/pathutils"
v3 "github.com/unionj-cloud/go-doudou/v2/toolkit/protobuf/v3"
"github.com/unionj-cloud/toolkit/pathutils"
v3 "github.com/unionj-cloud/toolkit/protobuf/v3"
)

var modName string
Expand Down
14 changes: 7 additions & 7 deletions cmd/internal/ddl/codegen/dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
log "github.com/sirupsen/logrus"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/table"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/templates"
"github.com/unionj-cloud/go-doudou/v2/toolkit/astutils"
"github.com/unionj-cloud/toolkit/astutils"
"github.com/unionj-cloud/go-doudou/v2/version"
)

Expand All @@ -22,12 +22,12 @@ import (
"fmt"
"github.com/pkg/errors"
"{{.EntityPackage}}"
"github.com/unionj-cloud/go-doudou/v2/toolkit/caller"
"github.com/unionj-cloud/go-doudou/v2/toolkit/sqlext/query"
"github.com/unionj-cloud/go-doudou/v2/toolkit/sqlext/wrapper"
"github.com/unionj-cloud/go-doudou/v2/toolkit/reflectutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/stringutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/templateutils"
"github.com/unionj-cloud/toolkit/caller"
"github.com/unionj-cloud/toolkit/sqlext/query"
"github.com/unionj-cloud/toolkit/sqlext/wrapper"
"github.com/unionj-cloud/toolkit/reflectutils"
"github.com/unionj-cloud/toolkit/stringutils"
"github.com/unionj-cloud/toolkit/templateutils"
"strings"
"math"
"time"
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/ddl/codegen/daosql.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/iancoleman/strcase"
log "github.com/sirupsen/logrus"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/table"
"github.com/unionj-cloud/go-doudou/v2/toolkit/astutils"
"github.com/unionj-cloud/toolkit/astutils"
"github.com/unionj-cloud/go-doudou/v2/version"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/ddl/codegen/dto.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/sirupsen/logrus"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/templates"
"github.com/unionj-cloud/go-doudou/v2/toolkit/astutils"
"github.com/unionj-cloud/toolkit/astutils"
"github.com/unionj-cloud/go-doudou/v2/version"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/internal/ddl/codegen/entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

log "github.com/sirupsen/logrus"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/templates"
"github.com/unionj-cloud/go-doudou/v2/toolkit/astutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/templateutils"
"github.com/unionj-cloud/toolkit/astutils"
"github.com/unionj-cloud/toolkit/templateutils"
"github.com/unionj-cloud/go-doudou/v2/version"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/internal/ddl/codegen/idao.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import (
log "github.com/sirupsen/logrus"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/table"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/templates"
"github.com/unionj-cloud/go-doudou/v2/toolkit/astutils"
"github.com/unionj-cloud/toolkit/astutils"
"github.com/unionj-cloud/go-doudou/v2/version"
)

var idaoTmpl = templates.EditableHeaderTmpl + `package dao
import (
"context"
"github.com/unionj-cloud/go-doudou/v2/toolkit/sqlext/query"
"github.com/unionj-cloud/toolkit/sqlext/query"
"{{.EntityPackage}}"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/internal/ddl/ddlast/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"sort"
"strings"

"github.com/unionj-cloud/go-doudou/v2/toolkit/astutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/sliceutils"
"github.com/unionj-cloud/toolkit/astutils"
"github.com/unionj-cloud/toolkit/sliceutils"
)

type sortableFieldMeta []astutils.FieldMeta
Expand Down
4 changes: 2 additions & 2 deletions cmd/internal/ddl/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/unionj-cloud/go-doudou/v2/toolkit/astutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/caller"
"github.com/unionj-cloud/toolkit/astutils"
"github.com/unionj-cloud/toolkit/caller"

// here must import mysql
_ "github.com/go-sql-driver/mysql"
Expand Down
16 changes: 8 additions & 8 deletions cmd/internal/ddl/table/ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ import (
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/ddlast"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/extraenum"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/sortenum"
"github.com/unionj-cloud/go-doudou/v2/toolkit/astutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/caller"
"github.com/unionj-cloud/go-doudou/v2/toolkit/envconfig"
"github.com/unionj-cloud/go-doudou/v2/toolkit/pathutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/sliceutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/sqlext/wrapper"
"github.com/unionj-cloud/go-doudou/v2/toolkit/stringutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/zlogger"
"github.com/unionj-cloud/toolkit/astutils"
"github.com/unionj-cloud/toolkit/caller"
"github.com/unionj-cloud/toolkit/envconfig"
"github.com/unionj-cloud/toolkit/pathutils"
"github.com/unionj-cloud/toolkit/sliceutils"
"github.com/unionj-cloud/toolkit/sqlext/wrapper"
"github.com/unionj-cloud/toolkit/stringutils"
"github.com/unionj-cloud/toolkit/zlogger"
)

// CreateTable create table from Table
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/ddl/table/ddl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/columnenum"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/sortenum"
"github.com/unionj-cloud/go-doudou/v2/toolkit/sqlext/wrapper"
"github.com/unionj-cloud/toolkit/sqlext/wrapper"
)

func ExampleCreateTable() {
Expand Down
6 changes: 3 additions & 3 deletions cmd/internal/ddl/table/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/keyenum"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/nullenum"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/sortenum"
"github.com/unionj-cloud/go-doudou/v2/toolkit/astutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/stringutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/templateutils"
"github.com/unionj-cloud/toolkit/astutils"
"github.com/unionj-cloud/toolkit/stringutils"
"github.com/unionj-cloud/toolkit/templateutils"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions cmd/internal/ddl/table/table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/keyenum"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/nullenum"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/sortenum"
"github.com/unionj-cloud/go-doudou/v2/toolkit/astutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/pathutils"
"github.com/unionj-cloud/toolkit/astutils"
"github.com/unionj-cloud/toolkit/pathutils"
)

func ExampleNewTableFromStruct() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/internal/enum/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/unionj-cloud/go-doudou/v2/toolkit/astutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/stringutils"
"github.com/unionj-cloud/toolkit/astutils"
"github.com/unionj-cloud/toolkit/stringutils"
"github.com/unionj-cloud/go-doudou/v2/version"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/internal/modular/work.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

"github.com/sirupsen/logrus"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/templates"
"github.com/unionj-cloud/go-doudou/v2/toolkit/common"
"github.com/unionj-cloud/go-doudou/v2/toolkit/executils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/stringutils"
"github.com/unionj-cloud/toolkit/common"
"github.com/unionj-cloud/toolkit/executils"
"github.com/unionj-cloud/toolkit/stringutils"
"github.com/unionj-cloud/go-doudou/v2/version"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/internal/name/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package name
import (
"github.com/iancoleman/strcase"
"github.com/pkg/errors"
"github.com/unionj-cloud/go-doudou/v2/toolkit/astutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/stringutils"
"github.com/unionj-cloud/toolkit/astutils"
"github.com/unionj-cloud/toolkit/stringutils"
)

// Name wraps config properties for name command
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/name/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"github.com/unionj-cloud/go-doudou/v2/toolkit/pathutils"
"github.com/unionj-cloud/toolkit/pathutils"
)

const initCode = `package testdata
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/openapi/v3/codegen/client/go.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/openapi/v3/codegen"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/templates"
v3 "github.com/unionj-cloud/go-doudou/v2/toolkit/openapi/v3"
v3 "github.com/unionj-cloud/toolkit/openapi/v3"
)

var dtoTmpl = templates.EditableHeaderTmpl + `package {{.Pkg}}
Expand Down
16 changes: 8 additions & 8 deletions cmd/internal/openapi/v3/codegen/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/templates"
"github.com/unionj-cloud/go-doudou/v2/toolkit/astutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/copier"
v3 "github.com/unionj-cloud/go-doudou/v2/toolkit/openapi/v3"
"github.com/unionj-cloud/go-doudou/v2/toolkit/sliceutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/stringutils"
"github.com/unionj-cloud/toolkit/astutils"
"github.com/unionj-cloud/toolkit/copier"
v3 "github.com/unionj-cloud/toolkit/openapi/v3"
"github.com/unionj-cloud/toolkit/sliceutils"
"github.com/unionj-cloud/toolkit/stringutils"
"github.com/unionj-cloud/go-doudou/v2/version"
)

Expand Down Expand Up @@ -666,10 +666,10 @@ import (
"github.com/opentracing/opentracing-go"
"github.com/unionj-cloud/go-doudou/v2/framework/registry"
_querystring "github.com/google/go-querystring/query"
"github.com/unionj-cloud/go-doudou/v2/toolkit/fileutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/stringutils"
"github.com/unionj-cloud/toolkit/fileutils"
"github.com/unionj-cloud/toolkit/stringutils"
"github.com/unionj-cloud/go-doudou/v2/framework/restclient"
v3 "github.com/unionj-cloud/go-doudou/v2/toolkit/openapi/v3"
v3 "github.com/unionj-cloud/toolkit/openapi/v3"
"io"
"mime/multipart"
"net/url"
Expand Down
4 changes: 2 additions & 2 deletions cmd/internal/openapi/v3/codegen/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"testing"

"github.com/stretchr/testify/assert"
v3 "github.com/unionj-cloud/go-doudou/v2/toolkit/openapi/v3"
"github.com/unionj-cloud/go-doudou/v2/toolkit/pathutils"
v3 "github.com/unionj-cloud/toolkit/openapi/v3"
"github.com/unionj-cloud/toolkit/pathutils"
)

func TestPattern2Method(t *testing.T) {
Expand Down
10 changes: 5 additions & 5 deletions cmd/internal/openapi/v3/codegen/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"github.com/iancoleman/strcase"
"github.com/pkg/errors"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/templates"
"github.com/unionj-cloud/go-doudou/v2/toolkit/astutils"
v3 "github.com/unionj-cloud/go-doudou/v2/toolkit/openapi/v3"
"github.com/unionj-cloud/go-doudou/v2/toolkit/sliceutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/stringutils"
"github.com/unionj-cloud/toolkit/astutils"
v3 "github.com/unionj-cloud/toolkit/openapi/v3"
"github.com/unionj-cloud/toolkit/sliceutils"
"github.com/unionj-cloud/toolkit/stringutils"
"github.com/unionj-cloud/go-doudou/v2/version"
"golang.org/x/text/cases"
"golang.org/x/text/language"
Expand Down Expand Up @@ -183,7 +183,7 @@ var svcTmpl = templates.EditableHeaderTmpl + `package service
import (
"context"
"{{.DtoPackage}}"
v3 "github.com/unionj-cloud/go-doudou/v2/toolkit/openapi/v3"
v3 "github.com/unionj-cloud/toolkit/openapi/v3"
)
//go:generate go-doudou svc http
Expand Down
4 changes: 2 additions & 2 deletions cmd/internal/openapi/v3/codegen/server/svc.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/iancoleman/strcase"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/openapi/v3/codegen"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/templates"
"github.com/unionj-cloud/go-doudou/v2/toolkit/assert"
v3 "github.com/unionj-cloud/go-doudou/v2/toolkit/openapi/v3"
"github.com/unionj-cloud/toolkit/assert"
v3 "github.com/unionj-cloud/toolkit/openapi/v3"
)

var dtoTmpl = templates.EditableHeaderTmpl + `package {{.Pkg}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"github.com/pkg/errors"
"github.com/unionj-cloud/go-doudou/v2/framework/registry"
"github.com/unionj-cloud/go-doudou/v2/framework/restclient"
"github.com/unionj-cloud/go-doudou/v2/toolkit/fileutils"
"github.com/unionj-cloud/go-doudou/v2/toolkit/stringutils"
"github.com/unionj-cloud/toolkit/fileutils"
"github.com/unionj-cloud/toolkit/stringutils"
)

type DownloadClient struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/openapi/v3/codegen/testdata/test/petclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/pkg/errors"
"github.com/unionj-cloud/go-doudou/v2/framework/registry"
"github.com/unionj-cloud/go-doudou/v2/framework/restclient"
v3 "github.com/unionj-cloud/go-doudou/v2/toolkit/openapi/v3"
v3 "github.com/unionj-cloud/toolkit/openapi/v3"
)

type PetClient struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/pkg/errors"
"github.com/unionj-cloud/go-doudou/v2/framework/registry"
"github.com/unionj-cloud/go-doudou/v2/framework/restclient"
v3 "github.com/unionj-cloud/go-doudou/v2/toolkit/openapi/v3"
v3 "github.com/unionj-cloud/toolkit/openapi/v3"
)

type TextClient struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/pkg/errors"
"github.com/unionj-cloud/go-doudou/v2/framework/registry"
"github.com/unionj-cloud/go-doudou/v2/framework/restclient"
v3 "github.com/unionj-cloud/go-doudou/v2/toolkit/openapi/v3"
v3 "github.com/unionj-cloud/toolkit/openapi/v3"
)

type UploadClient struct {
Expand Down
6 changes: 3 additions & 3 deletions cmd/internal/svc/codegen/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import (

"github.com/sirupsen/logrus"
"github.com/unionj-cloud/go-doudou/v2/cmd/internal/templates"
"github.com/unionj-cloud/go-doudou/v2/toolkit/astutils"
"github.com/unionj-cloud/toolkit/astutils"
"github.com/unionj-cloud/go-doudou/v2/version"
)

var configTmpl = templates.EditableHeaderTmpl + `package config
import (
"github.com/unionj-cloud/go-doudou/v2/toolkit/envconfig"
"github.com/unionj-cloud/toolkit/envconfig"
"github.com/unionj-cloud/go-doudou/v2/framework/config"
"github.com/unionj-cloud/go-doudou/v2/toolkit/zlogger"
"github.com/unionj-cloud/toolkit/zlogger"
)
var G_Config *Config
Expand Down
Loading

0 comments on commit 4401977

Please sign in to comment.