修改go mod

This commit is contained in:
许 洋 2024-04-30 20:39:07 +08:00
parent 146206bd39
commit 1443ed8292
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"
"gr_hz/config" "std.gaore.com/Gaore-Go/gr_hz/config"
"gr_hz/generator" "std.gaore.com/Gaore-Go/gr_hz/generator"
"gr_hz/meta" "std.gaore.com/Gaore-Go/gr_hz/meta"
"gr_hz/protobuf" "std.gaore.com/Gaore-Go/gr_hz/protobuf"
"gr_hz/thrift" "std.gaore.com/Gaore-Go/gr_hz/thrift"
"gr_hz/util" "std.gaore.com/Gaore-Go/gr_hz/util"
"gr_hz/util/logs" "std.gaore.com/Gaore-Go/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"
"gr_hz/meta" "std.gaore.com/Gaore-Go/gr_hz/meta"
"gr_hz/util" "std.gaore.com/Gaore-Go/gr_hz/util"
"gr_hz/util/logs" "std.gaore.com/Gaore-Go/gr_hz/util/logs"
) )
type Argument struct { type Argument struct {

View File

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

View File

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

View File

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

View File

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

View File

@ -26,8 +26,8 @@ import (
"strings" "strings"
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
"gr_hz/meta" "std.gaore.com/Gaore-Go/gr_hz/meta"
"gr_hz/util" "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"
"gr_hz/generator/model" "std.gaore.com/Gaore-Go/gr_hz/generator/model"
"gr_hz/generator/model/golang" "std.gaore.com/Gaore-Go/gr_hz/generator/model/golang"
"gr_hz/meta" "std.gaore.com/Gaore-Go/gr_hz/meta"
"gr_hz/util" "std.gaore.com/Gaore-Go/gr_hz/util"
) )
//---------------------------------Backend---------------------------------- //---------------------------------Backend----------------------------------

View File

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

View File

@ -25,9 +25,9 @@ import (
"text/template" "text/template"
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
"gr_hz/generator/model" "std.gaore.com/Gaore-Go/gr_hz/generator/model"
"gr_hz/meta" "std.gaore.com/Gaore-Go/gr_hz/meta"
"gr_hz/util" "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"
"gr_hz/util" "std.gaore.com/Gaore-Go/gr_hz/util"
) )
type Router struct { type Router struct {

View File

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

2
go.mod
View File

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

View File

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

View File

@ -28,12 +28,12 @@ import (
"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"
"gr_hz/generator" "std.gaore.com/Gaore-Go/gr_hz/generator"
"gr_hz/generator/model" "std.gaore.com/Gaore-Go/gr_hz/generator/model"
"gr_hz/meta" "std.gaore.com/Gaore-Go/gr_hz/meta"
"gr_hz/protobuf/api" "std.gaore.com/Gaore-Go/gr_hz/protobuf/api"
"gr_hz/util" "std.gaore.com/Gaore-Go/gr_hz/util"
"gr_hz/util/logs" "std.gaore.com/Gaore-Go/gr_hz/util/logs"
) )
var BaseProto = descriptorpb.FileDescriptorProto{} var BaseProto = descriptorpb.FileDescriptorProto{}

View File

@ -60,12 +60,12 @@ import (
"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"
"gr_hz/config" "std.gaore.com/Gaore-Go/gr_hz/config"
"gr_hz/generator" "std.gaore.com/Gaore-Go/gr_hz/generator"
"gr_hz/generator/model" "std.gaore.com/Gaore-Go/gr_hz/generator/model"
"gr_hz/meta" "std.gaore.com/Gaore-Go/gr_hz/meta"
"gr_hz/util" "std.gaore.com/Gaore-Go/gr_hz/util"
"gr_hz/util/logs" "std.gaore.com/Gaore-Go/gr_hz/util/logs"
) )
type Plugin struct { type Plugin struct {

View File

@ -23,7 +23,7 @@ import (
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/pluginpb" "google.golang.org/protobuf/types/pluginpb"
"gr_hz/meta" "std.gaore.com/Gaore-Go/gr_hz/meta"
) )
func TestPlugin_Handle(t *testing.T) { func TestPlugin_Handle(t *testing.T) {

View File

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

View File

@ -26,11 +26,11 @@ import (
"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"
"gr_hz/config" "std.gaore.com/Gaore-Go/gr_hz/config"
"gr_hz/generator" "std.gaore.com/Gaore-Go/gr_hz/generator"
"gr_hz/generator/model" "std.gaore.com/Gaore-Go/gr_hz/generator/model"
"gr_hz/protobuf/api" "std.gaore.com/Gaore-Go/gr_hz/protobuf/api"
"gr_hz/util" "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="gr_hz/test" moduleName="std.gaore.com/Gaore-Go/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="gr_hz/test" moduleName="std.gaore.com/Gaore-Go/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 = "gr_hz/test/hertz_model/api"; option go_package = "std.gaore.com/Gaore-Go/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 = "gr_hz/test/hertz_model/other"; option go_package = "std.gaore.com/Gaore-Go/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 = "gr_hz/test/hertz_model/other"; option go_package = "std.gaore.com/Gaore-Go/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 = "gr_hz/test/hertz_model/psm"; option go_package = "std.gaore.com/Gaore-Go/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 = "gr_hz/test/hertz_model/psm"; option go_package = "std.gaore.com/Gaore-Go/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 = "gr_hz/test/hertz_model/api"; option go_package = "std.gaore.com/Gaore-Go/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 = "gr_hz/test/hertz_model/other"; option go_package = "std.gaore.com/Gaore-Go/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 = "gr_hz/test/hertz_model/other"; option go_package = "std.gaore.com/Gaore-Go/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 = "gr_hz/test/hertz_model/psm"; option go_package = "std.gaore.com/Gaore-Go/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 = "gr_hz/test/hertz_model/psm"; option go_package = "std.gaore.com/Gaore-Go/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"
"gr_hz/config" "std.gaore.com/Gaore-Go/gr_hz/config"
"gr_hz/generator" "std.gaore.com/Gaore-Go/gr_hz/generator"
"gr_hz/generator/model" "std.gaore.com/Gaore-Go/gr_hz/generator/model"
"gr_hz/meta" "std.gaore.com/Gaore-Go/gr_hz/meta"
"gr_hz/util" "std.gaore.com/Gaore-Go/gr_hz/util"
"gr_hz/util/logs" "std.gaore.com/Gaore-Go/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"
"gr_hz/config" "std.gaore.com/Gaore-Go/gr_hz/config"
"gr_hz/generator" "std.gaore.com/Gaore-Go/gr_hz/generator"
"gr_hz/generator/model" "std.gaore.com/Gaore-Go/gr_hz/generator/model"
"gr_hz/meta" "std.gaore.com/Gaore-Go/gr_hz/meta"
"gr_hz/util" "std.gaore.com/Gaore-Go/gr_hz/util"
"gr_hz/util/logs" "std.gaore.com/Gaore-Go/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"
"gr_hz/generator" "std.gaore.com/Gaore-Go/gr_hz/generator"
"gr_hz/meta" "std.gaore.com/Gaore-Go/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"
"gr_hz/generator/model" "std.gaore.com/Gaore-Go/gr_hz/generator/model"
"gr_hz/util" "std.gaore.com/Gaore-Go/gr_hz/util"
) )
var ( var (

View File

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

View File

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