修改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"
"github.com/urfave/cli/v2"
"gr_hz/config"
"gr_hz/generator"
"gr_hz/meta"
"gr_hz/protobuf"
"gr_hz/thrift"
"gr_hz/util"
"gr_hz/util/logs"
"std.gaore.com/Gaore-Go/gr_hz/config"
"std.gaore.com/Gaore-Go/gr_hz/generator"
"std.gaore.com/Gaore-Go/gr_hz/meta"
"std.gaore.com/Gaore-Go/gr_hz/protobuf"
"std.gaore.com/Gaore-Go/gr_hz/thrift"
"std.gaore.com/Gaore-Go/gr_hz/util"
"std.gaore.com/Gaore-Go/gr_hz/util/logs"
)
// global args. MUST fork it when use

View File

@ -23,9 +23,9 @@ import (
"strings"
"github.com/urfave/cli/v2"
"gr_hz/meta"
"gr_hz/util"
"gr_hz/util/logs"
"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 Argument struct {

View File

@ -24,9 +24,9 @@ import (
"strings"
"syscall"
"gr_hz/meta"
"gr_hz/util"
"gr_hz/util/logs"
"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"
)
func lookupTool(idlType string) (string, error) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -25,9 +25,9 @@ import (
"text/template"
"gopkg.in/yaml.v2"
"gr_hz/generator/model"
"gr_hz/meta"
"gr_hz/util"
"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 {

View File

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

View File

@ -25,9 +25,9 @@ import (
"strings"
"text/template"
"gr_hz/meta"
"gr_hz/util"
"gr_hz/util/logs"
"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"
)
var DefaultDelimiters = [2]string{"{{", "}}"}

View File

@ -21,7 +21,7 @@ import (
"text/template"
"github.com/Masterminds/sprig/v3"
"gr_hz/util"
"std.gaore.com/Gaore-Go/gr_hz/util"
)
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

View File

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

View File

@ -28,12 +28,12 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/runtime/protoimpl"
"google.golang.org/protobuf/types/descriptorpb"
"gr_hz/generator"
"gr_hz/generator/model"
"gr_hz/meta"
"gr_hz/protobuf/api"
"gr_hz/util"
"gr_hz/util/logs"
"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{}

View File

@ -60,12 +60,12 @@ import (
"google.golang.org/protobuf/runtime/protoimpl"
"google.golang.org/protobuf/types/descriptorpb"
"google.golang.org/protobuf/types/pluginpb"
"gr_hz/config"
"gr_hz/generator"
"gr_hz/generator/model"
"gr_hz/meta"
"gr_hz/util"
"gr_hz/util/logs"
"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 {

View File

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

View File

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

View File

@ -26,11 +26,11 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/runtime/protoimpl"
"google.golang.org/protobuf/types/descriptorpb"
"gr_hz/config"
"gr_hz/generator"
"gr_hz/generator/model"
"gr_hz/protobuf/api"
"gr_hz/util"
"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 (

View File

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

View File

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

View File

@ -4,7 +4,7 @@ package api;
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 {
optional string raw_body = 50101;

View File

@ -4,7 +4,7 @@ package hertz.other;
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 {
optional string IsBaseString = 1;

View File

@ -2,7 +2,7 @@ syntax = "proto2";
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 {
optional string IsOtherBaseTypeString = 1;

View File

@ -2,7 +2,7 @@ syntax = "proto2";
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 {
optional string IsBaseString = 1;

View File

@ -2,7 +2,7 @@ syntax = "proto2";
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 "base.proto";

View File

@ -4,7 +4,7 @@ package api;
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 {
optional string raw_body = 50101;

View File

@ -4,7 +4,7 @@ package hertz.other;
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 {
optional string IsBaseString = 1;

View File

@ -2,7 +2,7 @@ syntax = "proto2";
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 {
optional string IsOtherBaseTypeString = 1;

View File

@ -2,7 +2,7 @@ syntax = "proto2";
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 {
optional string IsBaseString = 1;

View File

@ -2,7 +2,7 @@ syntax = "proto3";
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 "base.proto";

View File

@ -25,12 +25,12 @@ import (
"github.com/cloudwego/thriftgo/generator/golang/styles"
"github.com/cloudwego/thriftgo/parser"
"github.com/cloudwego/thriftgo/semantic"
"gr_hz/config"
"gr_hz/generator"
"gr_hz/generator/model"
"gr_hz/meta"
"gr_hz/util"
"gr_hz/util/logs"
"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"
)
/*---------------------------Import-----------------------------*/

View File

@ -29,12 +29,12 @@ import (
"github.com/cloudwego/thriftgo/generator/golang/styles"
"github.com/cloudwego/thriftgo/parser"
thriftgo_plugin "github.com/cloudwego/thriftgo/plugin"
"gr_hz/config"
"gr_hz/generator"
"gr_hz/generator/model"
"gr_hz/meta"
"gr_hz/util"
"gr_hz/util/logs"
"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 {

View File

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

View File

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

View File

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

View File

@ -23,10 +23,10 @@ import (
"strings"
"github.com/cloudwego/thriftgo/parser"
"gr_hz/config"
"gr_hz/generator"
"gr_hz/generator/model"
"gr_hz/util"
"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/util"
)
const (

View File

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

View File

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

View File

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