修改mod

This commit is contained in:
许 洋 2024-04-30 23:00:05 +08:00
parent 3de6747f6c
commit 77fb257246
42 changed files with 97 additions and 97 deletions

View File

@ -24,13 +24,13 @@ import (
"strings" "strings"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"std.gaore.com/Gaore-Go/gr_hz/config" "golib.gaore.com/xuy2/gr_hz/config"
"std.gaore.com/Gaore-Go/gr_hz/generator" "golib.gaore.com/xuy2/gr_hz/generator"
"std.gaore.com/Gaore-Go/gr_hz/meta" "golib.gaore.com/xuy2/gr_hz/meta"
"std.gaore.com/Gaore-Go/gr_hz/protobuf" "golib.gaore.com/xuy2/gr_hz/protobuf"
"std.gaore.com/Gaore-Go/gr_hz/thrift" "golib.gaore.com/xuy2/gr_hz/thrift"
"std.gaore.com/Gaore-Go/gr_hz/util" "golib.gaore.com/xuy2/gr_hz/util"
"std.gaore.com/Gaore-Go/gr_hz/util/logs" "golib.gaore.com/xuy2/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"
"std.gaore.com/Gaore-Go/gr_hz/meta" "golib.gaore.com/xuy2/gr_hz/meta"
"std.gaore.com/Gaore-Go/gr_hz/util" "golib.gaore.com/xuy2/gr_hz/util"
"std.gaore.com/Gaore-Go/gr_hz/util/logs" "golib.gaore.com/xuy2/gr_hz/util/logs"
) )
type Argument struct { type Argument struct {

View File

@ -24,9 +24,9 @@ import (
"strings" "strings"
"syscall" "syscall"
"std.gaore.com/Gaore-Go/gr_hz/meta" "golib.gaore.com/xuy2/gr_hz/meta"
"std.gaore.com/Gaore-Go/gr_hz/util" "golib.gaore.com/xuy2/gr_hz/util"
"std.gaore.com/Gaore-Go/gr_hz/util/logs" "golib.gaore.com/xuy2/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"
"std.gaore.com/Gaore-Go/gr_hz/generator/model" "golib.gaore.com/xuy2/gr_hz/generator/model"
"std.gaore.com/Gaore-Go/gr_hz/util" "golib.gaore.com/xuy2/gr_hz/util"
) )
type ClientMethod struct { type ClientMethod struct {

View File

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

View File

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

View File

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

View File

@ -25,9 +25,9 @@ import (
"reflect" "reflect"
"strings" "strings"
"golib.gaore.com/xuy2/gr_hz/meta"
"golib.gaore.com/xuy2/gr_hz/util"
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
"std.gaore.com/Gaore-Go/gr_hz/meta"
"std.gaore.com/Gaore-Go/gr_hz/util"
) )
// Layout contains the basic information of idl // Layout contains the basic information of idl

View File

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

View File

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

View File

@ -24,10 +24,10 @@ import (
"reflect" "reflect"
"text/template" "text/template"
"golib.gaore.com/xuy2/gr_hz/generator/model"
"golib.gaore.com/xuy2/gr_hz/meta"
"golib.gaore.com/xuy2/gr_hz/util"
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
"std.gaore.com/Gaore-Go/gr_hz/generator/model"
"std.gaore.com/Gaore-Go/gr_hz/meta"
"std.gaore.com/Gaore-Go/gr_hz/util"
) )
type HttpPackage struct { type HttpPackage struct {

View File

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

View File

@ -25,9 +25,9 @@ import (
"strings" "strings"
"text/template" "text/template"
"std.gaore.com/Gaore-Go/gr_hz/meta" "golib.gaore.com/xuy2/gr_hz/meta"
"std.gaore.com/Gaore-Go/gr_hz/util" "golib.gaore.com/xuy2/gr_hz/util"
"std.gaore.com/Gaore-Go/gr_hz/util/logs" "golib.gaore.com/xuy2/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"
"std.gaore.com/Gaore-Go/gr_hz/util" "golib.gaore.com/xuy2/gr_hz/util"
) )
var funcMap = func() template.FuncMap { var funcMap = func() template.FuncMap {

2
go.mod
View File

@ -1,4 +1,4 @@
module std.gaore.com/Gaore-Go/gr_hz module golib.gaore.com/xuy2/gr_hz
go 1.16 go 1.16

View File

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

View File

@ -23,17 +23,17 @@ import (
"strings" "strings"
"github.com/jhump/protoreflect/desc" "github.com/jhump/protoreflect/desc"
"golib.gaore.com/xuy2/gr_hz/generator"
"golib.gaore.com/xuy2/gr_hz/generator/model"
"golib.gaore.com/xuy2/gr_hz/meta"
"golib.gaore.com/xuy2/gr_hz/protobuf/api"
"golib.gaore.com/xuy2/gr_hz/util"
"golib.gaore.com/xuy2/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"
"google.golang.org/protobuf/runtime/protoimpl" "google.golang.org/protobuf/runtime/protoimpl"
"google.golang.org/protobuf/types/descriptorpb" "google.golang.org/protobuf/types/descriptorpb"
"std.gaore.com/Gaore-Go/gr_hz/generator"
"std.gaore.com/Gaore-Go/gr_hz/generator/model"
"std.gaore.com/Gaore-Go/gr_hz/meta"
"std.gaore.com/Gaore-Go/gr_hz/protobuf/api"
"std.gaore.com/Gaore-Go/gr_hz/util"
"std.gaore.com/Gaore-Go/gr_hz/util/logs"
) )
var BaseProto = descriptorpb.FileDescriptorProto{} var BaseProto = descriptorpb.FileDescriptorProto{}

View File

@ -54,18 +54,18 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"golib.gaore.com/xuy2/gr_hz/config"
"golib.gaore.com/xuy2/gr_hz/generator"
"golib.gaore.com/xuy2/gr_hz/generator/model"
"golib.gaore.com/xuy2/gr_hz/meta"
"golib.gaore.com/xuy2/gr_hz/util"
"golib.gaore.com/xuy2/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"
"google.golang.org/protobuf/runtime/protoimpl" "google.golang.org/protobuf/runtime/protoimpl"
"google.golang.org/protobuf/types/descriptorpb" "google.golang.org/protobuf/types/descriptorpb"
"google.golang.org/protobuf/types/pluginpb" "google.golang.org/protobuf/types/pluginpb"
"std.gaore.com/Gaore-Go/gr_hz/config"
"std.gaore.com/Gaore-Go/gr_hz/generator"
"std.gaore.com/Gaore-Go/gr_hz/generator/model"
"std.gaore.com/Gaore-Go/gr_hz/meta"
"std.gaore.com/Gaore-Go/gr_hz/util"
"std.gaore.com/Gaore-Go/gr_hz/util/logs"
) )
type Plugin struct { type Plugin struct {

View File

@ -21,9 +21,9 @@ import (
"strings" "strings"
"testing" "testing"
"golib.gaore.com/xuy2/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"
"std.gaore.com/Gaore-Go/gr_hz/meta"
) )
func TestPlugin_Handle(t *testing.T) { func TestPlugin_Handle(t *testing.T) {

View File

@ -21,9 +21,9 @@ import (
"strings" "strings"
"github.com/jhump/protoreflect/desc" "github.com/jhump/protoreflect/desc"
"golib.gaore.com/xuy2/gr_hz/generator/model"
"golib.gaore.com/xuy2/gr_hz/util"
"google.golang.org/protobuf/types/descriptorpb" "google.golang.org/protobuf/types/descriptorpb"
"std.gaore.com/Gaore-Go/gr_hz/generator/model"
"std.gaore.com/Gaore-Go/gr_hz/util"
) )
type Symbol struct { type Symbol struct {

View File

@ -22,15 +22,15 @@ import (
"strconv" "strconv"
"strings" "strings"
"golib.gaore.com/xuy2/gr_hz/config"
"golib.gaore.com/xuy2/gr_hz/generator"
"golib.gaore.com/xuy2/gr_hz/generator/model"
"golib.gaore.com/xuy2/gr_hz/protobuf/api"
"golib.gaore.com/xuy2/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"
"google.golang.org/protobuf/types/descriptorpb" "google.golang.org/protobuf/types/descriptorpb"
"std.gaore.com/Gaore-Go/gr_hz/config"
"std.gaore.com/Gaore-Go/gr_hz/generator"
"std.gaore.com/Gaore-Go/gr_hz/generator/model"
"std.gaore.com/Gaore-Go/gr_hz/protobuf/api"
"std.gaore.com/Gaore-Go/gr_hz/util"
) )
var ( var (

View File

@ -1,7 +1,7 @@
#! /usr/bin/env bash #! /usr/bin/env bash
# const value define # const value define
moduleName="std.gaore.com/Gaore-Go/gr_hz/test" moduleName="golib.gaore.com/xuy2/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="std.gaore.com/Gaore-Go/gr_hz/test" moduleName="golib.gaore.com/xuy2/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 = "std.gaore.com/Gaore-Go/gr_hz/test/hertz_model/api"; option go_package = "golib.gaore.com/xuy2/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 = "std.gaore.com/Gaore-Go/gr_hz/test/hertz_model/other"; option go_package = "golib.gaore.com/xuy2/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 = "std.gaore.com/Gaore-Go/gr_hz/test/hertz_model/other"; option go_package = "golib.gaore.com/xuy2/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 = "std.gaore.com/Gaore-Go/gr_hz/test/hertz_model/psm"; option go_package = "golib.gaore.com/xuy2/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 = "std.gaore.com/Gaore-Go/gr_hz/test/hertz_model/psm"; option go_package = "golib.gaore.com/xuy2/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 = "std.gaore.com/Gaore-Go/gr_hz/test/hertz_model/api"; option go_package = "golib.gaore.com/xuy2/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 = "std.gaore.com/Gaore-Go/gr_hz/test/hertz_model/other"; option go_package = "golib.gaore.com/xuy2/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 = "std.gaore.com/Gaore-Go/gr_hz/test/hertz_model/other"; option go_package = "golib.gaore.com/xuy2/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 = "std.gaore.com/Gaore-Go/gr_hz/test/hertz_model/psm"; option go_package = "golib.gaore.com/xuy2/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 = "std.gaore.com/Gaore-Go/gr_hz/test/hertz_model/psm"; option go_package = "golib.gaore.com/xuy2/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"
"std.gaore.com/Gaore-Go/gr_hz/config" "golib.gaore.com/xuy2/gr_hz/config"
"std.gaore.com/Gaore-Go/gr_hz/generator" "golib.gaore.com/xuy2/gr_hz/generator"
"std.gaore.com/Gaore-Go/gr_hz/generator/model" "golib.gaore.com/xuy2/gr_hz/generator/model"
"std.gaore.com/Gaore-Go/gr_hz/meta" "golib.gaore.com/xuy2/gr_hz/meta"
"std.gaore.com/Gaore-Go/gr_hz/util" "golib.gaore.com/xuy2/gr_hz/util"
"std.gaore.com/Gaore-Go/gr_hz/util/logs" "golib.gaore.com/xuy2/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"
"std.gaore.com/Gaore-Go/gr_hz/config" "golib.gaore.com/xuy2/gr_hz/config"
"std.gaore.com/Gaore-Go/gr_hz/generator" "golib.gaore.com/xuy2/gr_hz/generator"
"std.gaore.com/Gaore-Go/gr_hz/generator/model" "golib.gaore.com/xuy2/gr_hz/generator/model"
"std.gaore.com/Gaore-Go/gr_hz/meta" "golib.gaore.com/xuy2/gr_hz/meta"
"std.gaore.com/Gaore-Go/gr_hz/util" "golib.gaore.com/xuy2/gr_hz/util"
"std.gaore.com/Gaore-Go/gr_hz/util/logs" "golib.gaore.com/xuy2/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"
"std.gaore.com/Gaore-Go/gr_hz/generator" "golib.gaore.com/xuy2/gr_hz/generator"
"std.gaore.com/Gaore-Go/gr_hz/meta" "golib.gaore.com/xuy2/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"
"std.gaore.com/Gaore-Go/gr_hz/generator/model" "golib.gaore.com/xuy2/gr_hz/generator/model"
"std.gaore.com/Gaore-Go/gr_hz/util" "golib.gaore.com/xuy2/gr_hz/util"
) )
var ( var (

View File

@ -22,7 +22,7 @@ import (
"testing" "testing"
"github.com/cloudwego/thriftgo/plugin" "github.com/cloudwego/thriftgo/plugin"
"std.gaore.com/Gaore-Go/gr_hz/config" "golib.gaore.com/xuy2/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"
"std.gaore.com/Gaore-Go/gr_hz/config" "golib.gaore.com/xuy2/gr_hz/config"
"std.gaore.com/Gaore-Go/gr_hz/generator" "golib.gaore.com/xuy2/gr_hz/generator"
"std.gaore.com/Gaore-Go/gr_hz/generator/model" "golib.gaore.com/xuy2/gr_hz/generator/model"
"std.gaore.com/Gaore-Go/gr_hz/util" "golib.gaore.com/xuy2/gr_hz/util"
) )
const ( const (

View File

@ -26,7 +26,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"std.gaore.com/Gaore-Go/gr_hz/util/logs" "golib.gaore.com/xuy2/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"
"std.gaore.com/Gaore-Go/gr_hz/meta" "golib.gaore.com/xuy2/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"
"std.gaore.com/Gaore-Go/gr_hz/meta" "golib.gaore.com/xuy2/gr_hz/meta"
"std.gaore.com/Gaore-Go/gr_hz/util/logs" "golib.gaore.com/xuy2/gr_hz/util/logs"
) )
const ThriftgoMiniVersion = "v0.2.0" const ThriftgoMiniVersion = "v0.2.0"