修改mod

This commit is contained in:
许 洋 2024-04-30 23:07:06 +08:00
parent 77fb257246
commit 1d08b5ec02
41 changed files with 96 additions and 96 deletions

View File

@ -24,13 +24,13 @@ import (
"strings" "strings"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"golib.gaore.com/xuy2/gr_hz/config" "golib.gaore.com/GaoreGo/gr_hz/config"
"golib.gaore.com/xuy2/gr_hz/generator" "golib.gaore.com/GaoreGo/gr_hz/generator"
"golib.gaore.com/xuy2/gr_hz/meta" "golib.gaore.com/GaoreGo/gr_hz/meta"
"golib.gaore.com/xuy2/gr_hz/protobuf" "golib.gaore.com/GaoreGo/gr_hz/protobuf"
"golib.gaore.com/xuy2/gr_hz/thrift" "golib.gaore.com/GaoreGo/gr_hz/thrift"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
"golib.gaore.com/xuy2/gr_hz/util/logs" "golib.gaore.com/GaoreGo/gr_hz/util/logs"
) )
// global args. MUST fork it when use // global args. MUST fork it when use

View File

@ -23,9 +23,9 @@ import (
"strings" "strings"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"golib.gaore.com/xuy2/gr_hz/meta" "golib.gaore.com/GaoreGo/gr_hz/meta"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
"golib.gaore.com/xuy2/gr_hz/util/logs" "golib.gaore.com/GaoreGo/gr_hz/util/logs"
) )
type Argument struct { type Argument struct {

View File

@ -24,9 +24,9 @@ import (
"strings" "strings"
"syscall" "syscall"
"golib.gaore.com/xuy2/gr_hz/meta" "golib.gaore.com/GaoreGo/gr_hz/meta"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
"golib.gaore.com/xuy2/gr_hz/util/logs" "golib.gaore.com/GaoreGo/gr_hz/util/logs"
) )
func lookupTool(idlType string) (string, error) { func lookupTool(idlType string) (string, error) {

View File

@ -20,8 +20,8 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"golib.gaore.com/xuy2/gr_hz/generator/model" "golib.gaore.com/GaoreGo/gr_hz/generator/model"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
) )
type ClientMethod struct { type ClientMethod struct {

View File

@ -24,8 +24,8 @@ import (
"strings" "strings"
"text/template" "text/template"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
"golib.gaore.com/xuy2/gr_hz/util/logs" "golib.gaore.com/GaoreGo/gr_hz/util/logs"
) )
type FilePathRenderInfo struct { type FilePathRenderInfo struct {

View File

@ -22,7 +22,7 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
) )
type File struct { type File struct {

View File

@ -23,9 +23,9 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"golib.gaore.com/xuy2/gr_hz/generator/model" "golib.gaore.com/GaoreGo/gr_hz/generator/model"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
"golib.gaore.com/xuy2/gr_hz/util/logs" "golib.gaore.com/GaoreGo/gr_hz/util/logs"
) )
type HttpMethod struct { type HttpMethod struct {

View File

@ -25,8 +25,8 @@ import (
"reflect" "reflect"
"strings" "strings"
"golib.gaore.com/xuy2/gr_hz/meta" "golib.gaore.com/GaoreGo/gr_hz/meta"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
) )

View File

@ -22,10 +22,10 @@ import (
"strings" "strings"
"text/template" "text/template"
"golib.gaore.com/xuy2/gr_hz/generator/model" "golib.gaore.com/GaoreGo/gr_hz/generator/model"
"golib.gaore.com/xuy2/gr_hz/generator/model/golang" "golib.gaore.com/GaoreGo/gr_hz/generator/model/golang"
"golib.gaore.com/xuy2/gr_hz/meta" "golib.gaore.com/GaoreGo/gr_hz/meta"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
) )
//---------------------------------Backend---------------------------------- //---------------------------------Backend----------------------------------

View File

@ -20,8 +20,8 @@ import (
"testing" "testing"
"text/template" "text/template"
"golib.gaore.com/xuy2/gr_hz/generator/model" "golib.gaore.com/GaoreGo/gr_hz/generator/model"
"golib.gaore.com/xuy2/gr_hz/meta" "golib.gaore.com/GaoreGo/gr_hz/meta"
) )
type StringValue struct { type StringValue struct {

View File

@ -24,9 +24,9 @@ import (
"reflect" "reflect"
"text/template" "text/template"
"golib.gaore.com/xuy2/gr_hz/generator/model" "golib.gaore.com/GaoreGo/gr_hz/generator/model"
"golib.gaore.com/xuy2/gr_hz/meta" "golib.gaore.com/GaoreGo/gr_hz/meta"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
) )

View File

@ -25,7 +25,7 @@ import (
"sort" "sort"
"strings" "strings"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
) )
type Router struct { type Router struct {

View File

@ -25,9 +25,9 @@ import (
"strings" "strings"
"text/template" "text/template"
"golib.gaore.com/xuy2/gr_hz/meta" "golib.gaore.com/GaoreGo/gr_hz/meta"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
"golib.gaore.com/xuy2/gr_hz/util/logs" "golib.gaore.com/GaoreGo/gr_hz/util/logs"
) )
var DefaultDelimiters = [2]string{"{{", "}}"} var DefaultDelimiters = [2]string{"{{", "}}"}

View File

@ -21,7 +21,7 @@ import (
"text/template" "text/template"
"github.com/Masterminds/sprig/v3" "github.com/Masterminds/sprig/v3"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
) )
var funcMap = func() template.FuncMap { var funcMap = func() template.FuncMap {

View File

@ -19,8 +19,8 @@ package main
import ( import (
"os" "os"
"golib.gaore.com/xuy2/gr_hz/app" "golib.gaore.com/GaoreGo/gr_hz/app"
"golib.gaore.com/xuy2/gr_hz/util/logs" "golib.gaore.com/GaoreGo/gr_hz/util/logs"
) )
func main() { func main() {

View File

@ -23,12 +23,12 @@ import (
"strings" "strings"
"github.com/jhump/protoreflect/desc" "github.com/jhump/protoreflect/desc"
"golib.gaore.com/xuy2/gr_hz/generator" "golib.gaore.com/GaoreGo/gr_hz/generator"
"golib.gaore.com/xuy2/gr_hz/generator/model" "golib.gaore.com/GaoreGo/gr_hz/generator/model"
"golib.gaore.com/xuy2/gr_hz/meta" "golib.gaore.com/GaoreGo/gr_hz/meta"
"golib.gaore.com/xuy2/gr_hz/protobuf/api" "golib.gaore.com/GaoreGo/gr_hz/protobuf/api"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
"golib.gaore.com/xuy2/gr_hz/util/logs" "golib.gaore.com/GaoreGo/gr_hz/util/logs"
"google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/compiler/protogen"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoreflect"

View File

@ -54,12 +54,12 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"golib.gaore.com/xuy2/gr_hz/config" "golib.gaore.com/GaoreGo/gr_hz/config"
"golib.gaore.com/xuy2/gr_hz/generator" "golib.gaore.com/GaoreGo/gr_hz/generator"
"golib.gaore.com/xuy2/gr_hz/generator/model" "golib.gaore.com/GaoreGo/gr_hz/generator/model"
"golib.gaore.com/xuy2/gr_hz/meta" "golib.gaore.com/GaoreGo/gr_hz/meta"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
"golib.gaore.com/xuy2/gr_hz/util/logs" "golib.gaore.com/GaoreGo/gr_hz/util/logs"
gengo "google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo" gengo "google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo"
"google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/compiler/protogen"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"

View File

@ -21,7 +21,7 @@ import (
"strings" "strings"
"testing" "testing"
"golib.gaore.com/xuy2/gr_hz/meta" "golib.gaore.com/GaoreGo/gr_hz/meta"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/pluginpb" "google.golang.org/protobuf/types/pluginpb"
) )

View File

@ -21,8 +21,8 @@ import (
"strings" "strings"
"github.com/jhump/protoreflect/desc" "github.com/jhump/protoreflect/desc"
"golib.gaore.com/xuy2/gr_hz/generator/model" "golib.gaore.com/GaoreGo/gr_hz/generator/model"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
"google.golang.org/protobuf/types/descriptorpb" "google.golang.org/protobuf/types/descriptorpb"
) )

View File

@ -22,11 +22,11 @@ import (
"strconv" "strconv"
"strings" "strings"
"golib.gaore.com/xuy2/gr_hz/config" "golib.gaore.com/GaoreGo/gr_hz/config"
"golib.gaore.com/xuy2/gr_hz/generator" "golib.gaore.com/GaoreGo/gr_hz/generator"
"golib.gaore.com/xuy2/gr_hz/generator/model" "golib.gaore.com/GaoreGo/gr_hz/generator/model"
"golib.gaore.com/xuy2/gr_hz/protobuf/api" "golib.gaore.com/GaoreGo/gr_hz/protobuf/api"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/runtime/protoimpl" "google.golang.org/protobuf/runtime/protoimpl"

View File

@ -1,7 +1,7 @@
#! /usr/bin/env bash #! /usr/bin/env bash
# const value define # const value define
moduleName="golib.gaore.com/xuy2/gr_hz/test" moduleName="golib.gaore.com/GaoreGo/gr_hz/test"
curDir=`pwd` curDir=`pwd`
thriftIDL=$curDir"/testdata/thrift/psm.thrift" thriftIDL=$curDir"/testdata/thrift/psm.thrift"
protobuf2IDL=$curDir"/testdata/protobuf2/psm/psm.proto" protobuf2IDL=$curDir"/testdata/protobuf2/psm/psm.proto"

View File

@ -1,7 +1,7 @@
#! /usr/bin/env bash #! /usr/bin/env bash
# const value define # const value define
moduleName="golib.gaore.com/xuy2/gr_hz/test" moduleName="golib.gaore.com/GaoreGo/gr_hz/test"
curDir=`pwd` curDir=`pwd`
thriftIDL=$curDir"/testdata/thrift/psm.thrift" thriftIDL=$curDir"/testdata/thrift/psm.thrift"
protobuf2IDL=$curDir"/testdata/protobuf2/psm/psm.proto" protobuf2IDL=$curDir"/testdata/protobuf2/psm/psm.proto"

View File

@ -4,7 +4,7 @@ package api;
import "google/protobuf/descriptor.proto"; import "google/protobuf/descriptor.proto";
option go_package = "golib.gaore.com/xuy2/gr_hz/test/hertz_model/api"; option go_package = "golib.gaore.com/GaoreGo/gr_hz/test/hertz_model/api";
extend google.protobuf.FieldOptions { extend google.protobuf.FieldOptions {
optional string raw_body = 50101; optional string raw_body = 50101;

View File

@ -4,7 +4,7 @@ package hertz.other;
import "other/other_base.proto"; import "other/other_base.proto";
option go_package = "golib.gaore.com/xuy2/gr_hz/test/hertz_model/other"; option go_package = "golib.gaore.com/GaoreGo/gr_hz/test/hertz_model/other";
message OtherType { message OtherType {
optional string IsBaseString = 1; optional string IsBaseString = 1;

View File

@ -2,7 +2,7 @@ syntax = "proto2";
package hertz.other; package hertz.other;
option go_package = "golib.gaore.com/xuy2/gr_hz/test/hertz_model/other"; option go_package = "golib.gaore.com/GaoreGo/gr_hz/test/hertz_model/other";
message OtherBaseType { message OtherBaseType {
optional string IsOtherBaseTypeString = 1; optional string IsOtherBaseTypeString = 1;

View File

@ -2,7 +2,7 @@ syntax = "proto2";
package base; package base;
option go_package = "golib.gaore.com/xuy2/gr_hz/test/hertz_model/psm"; option go_package = "golib.gaore.com/GaoreGo/gr_hz/test/hertz_model/psm";
message Base { message Base {
optional string IsBaseString = 1; optional string IsBaseString = 1;

View File

@ -2,7 +2,7 @@ syntax = "proto2";
package psm; package psm;
option go_package = "golib.gaore.com/xuy2/gr_hz/test/hertz_model/psm"; option go_package = "golib.gaore.com/GaoreGo/gr_hz/test/hertz_model/psm";
import "api.proto"; import "api.proto";
import "base.proto"; import "base.proto";

View File

@ -4,7 +4,7 @@ package api;
import "google/protobuf/descriptor.proto"; import "google/protobuf/descriptor.proto";
option go_package = "golib.gaore.com/xuy2/gr_hz/test/hertz_model/api"; option go_package = "golib.gaore.com/GaoreGo/gr_hz/test/hertz_model/api";
extend google.protobuf.FieldOptions { extend google.protobuf.FieldOptions {
optional string raw_body = 50101; optional string raw_body = 50101;

View File

@ -4,7 +4,7 @@ package hertz.other;
import "other/other_base.proto"; import "other/other_base.proto";
option go_package = "golib.gaore.com/xuy2/gr_hz/test/hertz_model/other"; option go_package = "golib.gaore.com/GaoreGo/gr_hz/test/hertz_model/other";
message OtherType { message OtherType {
optional string IsBaseString = 1; optional string IsBaseString = 1;

View File

@ -2,7 +2,7 @@ syntax = "proto2";
package hertz.other; package hertz.other;
option go_package = "golib.gaore.com/xuy2/gr_hz/test/hertz_model/other"; option go_package = "golib.gaore.com/GaoreGo/gr_hz/test/hertz_model/other";
message OtherBaseType { message OtherBaseType {
optional string IsOtherBaseTypeString = 1; optional string IsOtherBaseTypeString = 1;

View File

@ -2,7 +2,7 @@ syntax = "proto2";
package base; package base;
option go_package = "golib.gaore.com/xuy2/gr_hz/test/hertz_model/psm"; option go_package = "golib.gaore.com/GaoreGo/gr_hz/test/hertz_model/psm";
message Base { message Base {
optional string IsBaseString = 1; optional string IsBaseString = 1;

View File

@ -2,7 +2,7 @@ syntax = "proto3";
package psm; package psm;
option go_package = "golib.gaore.com/xuy2/gr_hz/test/hertz_model/psm"; option go_package = "golib.gaore.com/GaoreGo/gr_hz/test/hertz_model/psm";
import "api.proto"; import "api.proto";
import "base.proto"; import "base.proto";

View File

@ -25,12 +25,12 @@ import (
"github.com/cloudwego/thriftgo/generator/golang/styles" "github.com/cloudwego/thriftgo/generator/golang/styles"
"github.com/cloudwego/thriftgo/parser" "github.com/cloudwego/thriftgo/parser"
"github.com/cloudwego/thriftgo/semantic" "github.com/cloudwego/thriftgo/semantic"
"golib.gaore.com/xuy2/gr_hz/config" "golib.gaore.com/GaoreGo/gr_hz/config"
"golib.gaore.com/xuy2/gr_hz/generator" "golib.gaore.com/GaoreGo/gr_hz/generator"
"golib.gaore.com/xuy2/gr_hz/generator/model" "golib.gaore.com/GaoreGo/gr_hz/generator/model"
"golib.gaore.com/xuy2/gr_hz/meta" "golib.gaore.com/GaoreGo/gr_hz/meta"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
"golib.gaore.com/xuy2/gr_hz/util/logs" "golib.gaore.com/GaoreGo/gr_hz/util/logs"
) )
/*---------------------------Import-----------------------------*/ /*---------------------------Import-----------------------------*/

View File

@ -29,12 +29,12 @@ import (
"github.com/cloudwego/thriftgo/generator/golang/styles" "github.com/cloudwego/thriftgo/generator/golang/styles"
"github.com/cloudwego/thriftgo/parser" "github.com/cloudwego/thriftgo/parser"
thriftgo_plugin "github.com/cloudwego/thriftgo/plugin" thriftgo_plugin "github.com/cloudwego/thriftgo/plugin"
"golib.gaore.com/xuy2/gr_hz/config" "golib.gaore.com/GaoreGo/gr_hz/config"
"golib.gaore.com/xuy2/gr_hz/generator" "golib.gaore.com/GaoreGo/gr_hz/generator"
"golib.gaore.com/xuy2/gr_hz/generator/model" "golib.gaore.com/GaoreGo/gr_hz/generator/model"
"golib.gaore.com/xuy2/gr_hz/meta" "golib.gaore.com/GaoreGo/gr_hz/meta"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
"golib.gaore.com/xuy2/gr_hz/util/logs" "golib.gaore.com/GaoreGo/gr_hz/util/logs"
) )
type Plugin struct { type Plugin struct {

View File

@ -21,8 +21,8 @@ import (
"testing" "testing"
"github.com/cloudwego/thriftgo/plugin" "github.com/cloudwego/thriftgo/plugin"
"golib.gaore.com/xuy2/gr_hz/generator" "golib.gaore.com/GaoreGo/gr_hz/generator"
"golib.gaore.com/xuy2/gr_hz/meta" "golib.gaore.com/GaoreGo/gr_hz/meta"
) )
func TestRun(t *testing.T) { func TestRun(t *testing.T) {

View File

@ -21,8 +21,8 @@ import (
"strings" "strings"
"github.com/cloudwego/thriftgo/parser" "github.com/cloudwego/thriftgo/parser"
"golib.gaore.com/xuy2/gr_hz/generator/model" "golib.gaore.com/GaoreGo/gr_hz/generator/model"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
) )
var ( var (

View File

@ -22,7 +22,7 @@ import (
"testing" "testing"
"github.com/cloudwego/thriftgo/plugin" "github.com/cloudwego/thriftgo/plugin"
"golib.gaore.com/xuy2/gr_hz/config" "golib.gaore.com/GaoreGo/gr_hz/config"
) )
func TestInsertTag(t *testing.T) { func TestInsertTag(t *testing.T) {

View File

@ -23,10 +23,10 @@ import (
"strings" "strings"
"github.com/cloudwego/thriftgo/parser" "github.com/cloudwego/thriftgo/parser"
"golib.gaore.com/xuy2/gr_hz/config" "golib.gaore.com/GaoreGo/gr_hz/config"
"golib.gaore.com/xuy2/gr_hz/generator" "golib.gaore.com/GaoreGo/gr_hz/generator"
"golib.gaore.com/xuy2/gr_hz/generator/model" "golib.gaore.com/GaoreGo/gr_hz/generator/model"
"golib.gaore.com/xuy2/gr_hz/util" "golib.gaore.com/GaoreGo/gr_hz/util"
) )
const ( const (

View File

@ -26,7 +26,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"golib.gaore.com/xuy2/gr_hz/util/logs" "golib.gaore.com/GaoreGo/gr_hz/util/logs"
) )
func CopyStringSlice(from, to *[]string) { func CopyStringSlice(from, to *[]string) {

View File

@ -27,7 +27,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"golib.gaore.com/xuy2/gr_hz/meta" "golib.gaore.com/GaoreGo/gr_hz/meta"
) )
func GetGOPATH() (gopath string, err error) { func GetGOPATH() (gopath string, err error) {

View File

@ -25,8 +25,8 @@ import (
"time" "time"
gv "github.com/hashicorp/go-version" gv "github.com/hashicorp/go-version"
"golib.gaore.com/xuy2/gr_hz/meta" "golib.gaore.com/GaoreGo/gr_hz/meta"
"golib.gaore.com/xuy2/gr_hz/util/logs" "golib.gaore.com/GaoreGo/gr_hz/util/logs"
) )
const ThriftgoMiniVersion = "v0.2.0" const ThriftgoMiniVersion = "v0.2.0"