From 964948151b133664e0c19070a7b0662d5b09367c Mon Sep 17 00:00:00 2001 From: Felix021 Date: Wed, 10 Jan 2024 14:45:24 +0800 Subject: [PATCH] feat: thrift streaming (#153) --- generator/golang/backend.go | 24 +++++++ generator/golang/imports.go | 1 + generator/golang/option.go | 2 + generator/golang/scope.go | 12 ++++ generator/golang/scope_internal.go | 33 ++++++--- generator/golang/streaming/streaming.go | 89 +++++++++++++++++++++++++ generator/golang/templates/client.go | 25 ++++++- generator/golang/templates/file.go | 6 +- generator/golang/templates/processor.go | 8 ++- generator/golang/templates/service.go | 17 +++-- generator/golang/templates/slim/slim.go | 27 ++++++-- generator/golang/util.go | 1 + parser/AST.go | 3 +- test/golang/cases_and_options/go.mod | 5 +- test/golang/cases_and_options/go.sum | 27 -------- version/version.go | 2 +- 16 files changed, 224 insertions(+), 58 deletions(-) create mode 100644 generator/golang/streaming/streaming.go diff --git a/generator/golang/backend.go b/generator/golang/backend.go index 57ac948f..1c52c734 100644 --- a/generator/golang/backend.go +++ b/generator/golang/backend.go @@ -21,6 +21,7 @@ import ( "strings" "text/template" + "github.com/cloudwego/thriftgo/generator/golang/streaming" "github.com/cloudwego/thriftgo/tool/trimmer/trim" ref_tpl "github.com/cloudwego/thriftgo/generator/golang/templates/ref" @@ -95,6 +96,9 @@ func (g *GoBackend) Generate(req *plugin.Request, log backend.LogFunc) *plugin.R } g.prepareTemplates() g.fillRequisitions() + if !g.utils.Features().ThriftStreaming { + g.removeStreamingFunctions(req.GetAST()) + } g.executeTemplates() return g.buildResponse() } @@ -265,3 +269,23 @@ func (g *GoBackend) PostProcess(path string, content []byte) ([]byte, error) { } return content, nil } + +func (g *GoBackend) removeStreamingFunctions(ast *parser.Thrift) { + for _, svc := range ast.Services { + functions := make([]*parser.Function, 0, len(svc.Functions)) + for _, f := range svc.Functions { + st, err := streaming.ParseStreaming(f) + if err != nil { + g.log.Warn(fmt.Sprintf("%s.%s: failed to parse streaming, err = %v", svc.Name, f.Name, err)) + continue + } + if st.IsStreaming { + g.log.Warn(fmt.Sprintf("skip streaming function %s.%s: not supported by your kitex, "+ + "please update your kitex tool to the latest version", svc.Name, f.Name)) + continue + } + functions = append(functions, f) + } + svc.Functions = functions + } +} diff --git a/generator/golang/imports.go b/generator/golang/imports.go index 8b70a008..754aadda 100644 --- a/generator/golang/imports.go +++ b/generator/golang/imports.go @@ -89,6 +89,7 @@ func (im *importManager) init(cu *CodeUtils, ast *parser.Thrift) { "thrift_reflection": ThriftReflectionLib, "json_utils": ThriftJSONUtilLib, "fieldmask": ThriftFieldMaskLib, + "streaming": KitexStreamingLib, } for pkg, path := range std { ns.Add(pkg, path) diff --git a/generator/golang/option.go b/generator/golang/option.go index f79775af..f1c94ea2 100644 --- a/generator/golang/option.go +++ b/generator/golang/option.go @@ -60,6 +60,7 @@ type Features struct { WithFieldMask bool `with_field_mask:"Support field-mask for generated code."` FieldMaskHalfway bool `field_mask_halfway:"Support set field-mask on not-root struct."` FieldMaskZeroRequired bool `field_mask_zero_required:"Write zero value instead of current value for required fields filtered by fieldmask."` + ThriftStreaming bool `thrift_streaming:"Recognize thrift streaming annotation and generate streaming code."` } var defaultFeatures = Features{ @@ -88,6 +89,7 @@ var defaultFeatures = Features{ SnakeTyleJSONTag: false, LowerCamelCaseJSONTag: false, GenerateReflectionInfo: false, + ThriftStreaming: false, EnumAsINT32: false, TrimIDL: false, JSONStringer: false, diff --git a/generator/golang/scope.go b/generator/golang/scope.go index e61dd3c9..23c2499c 100644 --- a/generator/golang/scope.go +++ b/generator/golang/scope.go @@ -19,6 +19,7 @@ import ( "path/filepath" "strings" + "github.com/cloudwego/thriftgo/generator/golang/streaming" "github.com/cloudwego/thriftgo/parser" "github.com/cloudwego/thriftgo/pkg/namespace" "github.com/cloudwego/thriftgo/reflection" @@ -652,6 +653,8 @@ type Function struct { throws []*Field argType *StructLike resType *StructLike + service *Service + streaming *streaming.Streaming } // GoName returns the go name of the function. @@ -659,6 +662,11 @@ func (f *Function) GoName() Name { return f.name } +// Service returns the service that the function is defined in. +func (f *Function) Service() *Service { + return f.service +} + // ResponseGoTypeName returns the go type of the response type of the function. func (f *Function) ResponseGoTypeName() TypeName { return f.responseType @@ -684,6 +692,10 @@ func (f *Function) ResType() *StructLike { return f.resType } +func (f *Function) Streaming() *streaming.Streaming { + return f.streaming +} + func buildSynthesized(v *parser.Function) (argType, resType *parser.StructLike) { argType = &parser.StructLike{ Category: "struct", diff --git a/generator/golang/scope_internal.go b/generator/golang/scope_internal.go index 2c0986eb..d1205349 100644 --- a/generator/golang/scope_internal.go +++ b/generator/golang/scope_internal.go @@ -16,10 +16,12 @@ package golang import ( "fmt" + "runtime/debug" "strconv" "strings" "github.com/cloudwego/thriftgo/generator/golang/common" + "github.com/cloudwego/thriftgo/generator/golang/streaming" "github.com/cloudwego/thriftgo/parser" "github.com/cloudwego/thriftgo/pkg/namespace" ) @@ -47,8 +49,8 @@ func newScope(ast *parser.Thrift) *Scope { func (s *Scope) init(cu *CodeUtils) (err error) { defer func() { - if x, ok := recover().(error); ok && x != nil { - err = x + if r := recover(); r != nil { + err = fmt.Errorf("err = %v, stack = %s", r, debug.Stack()) } }() if cu.Features().ReorderFields { @@ -62,7 +64,9 @@ func (s *Scope) init(cu *CodeUtils) (err error) { } s.imports.init(cu, s.ast) s.buildIncludes(cu) - s.installNames(cu) + if err = s.installNames(cu); err != nil { + return err + } s.resolveTypesAndValues(cu) return nil } @@ -108,9 +112,11 @@ func (s *Scope) includeIDL(cu *CodeUtils, t *parser.Thrift) (pkgName string) { return inc.PackageName } -func (s *Scope) installNames(cu *CodeUtils) { +func (s *Scope) installNames(cu *CodeUtils) error { for _, v := range s.ast.Services { - s.buildService(cu, v) + if err := s.buildService(cu, v); err != nil { + return err + } } for _, v := range s.ast.GetStructLikes() { s.buildStructLike(cu, v) @@ -124,6 +130,7 @@ func (s *Scope) installNames(cu *CodeUtils) { for _, v := range s.ast.Constants { s.buildConstant(cu, v) } + return nil } func (s *Scope) identify(cu *CodeUtils, raw string) string { @@ -139,7 +146,7 @@ func (s *Scope) identify(cu *CodeUtils, raw string) string { return name } -func (s *Scope) buildService(cu *CodeUtils, v *parser.Service) { +func (s *Scope) buildService(cu *CodeUtils, v *parser.Service) error { // service name sn := s.identify(cu, v.Name) sn = s.globals.Add(sn, v.Name) @@ -156,10 +163,17 @@ func (s *Scope) buildService(cu *CodeUtils, v *parser.Service) { for _, f := range v.Functions { fn := s.identify(cu, f.Name) fn = svc.scope.Add(fn, f.Name) + st, err := streaming.ParseStreaming(f) + if err != nil { + return fmt.Errorf("service %s: %s", v.Name, err.Error()) + } + svc.functions = append(svc.functions, &Function{ - Function: f, - scope: namespace.NewNamespace(namespace.UnderscoreSuffix), - name: Name(fn), + Function: f, + scope: namespace.NewNamespace(namespace.UnderscoreSuffix), + name: Name(fn), + service: svc, + streaming: st, }) } @@ -186,6 +200,7 @@ func (s *Scope) buildService(cu *CodeUtils, v *parser.Service) { pn := sn + "Processor" s.globals.MustReserve(cn, _p("client:"+v.Name)) s.globals.MustReserve(pn, _p("processor:"+v.Name)) + return nil } // buildFunction builds a namespace for parameters of a Function. diff --git a/generator/golang/streaming/streaming.go b/generator/golang/streaming/streaming.go new file mode 100644 index 00000000..b4deaaeb --- /dev/null +++ b/generator/golang/streaming/streaming.go @@ -0,0 +1,89 @@ +// Copyright 2023 CloudWeGo Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package streaming + +import ( + "fmt" + + "github.com/cloudwego/thriftgo/parser" +) + +// TODO this package should finally be migrated to Kitex tool together with server/client/processor templates. + +const ( + // Annotation key used in Thrift IDL + StreamingModeKey = "streaming.mode" + + // Streaming mode identifiers + StreamingBidirectional = "bidirectional" // Bidirectional streaming API over HTTP2 + StreamingClientSide = "client" // Client-side streaming API over HTTP2 + StreamingServerSide = "server" // Server-side streaming API over HTTP2 + StreamingUnary = "unary" // Unary API over HTTP2, different from Kitex Thrift/Protobuf +) + +// Streaming represents the streaming mode of a function +type Streaming struct { + Mode string `thrift:"Mode,1" json:"Mode"` + ClientStreaming bool `thrift:"ClientStreaming,2" json:"ClientStreaming"` + ServerStreaming bool `thrift:"ServerStreaming,3" json:"ServerStreaming"` + BidirectionalStreaming bool `thrift:"BidirectionalStreaming,4" json:"BidirectionalStreaming"` + Unary bool `thrift:"Unary,5" json:"Unary"` + IsStreaming bool `thrift:"IsStreaming,6" json:"IsStreaming"` +} + +// ParseStreaming parses the streaming mode from a Thrift function parsed from IDL +func ParseStreaming(f *parser.Function) (s *Streaming, err error) { + s = &Streaming{} + for _, anno := range f.Annotations { + if anno.Key != StreamingModeKey { + continue + } + if len(anno.Values) != 1 { + return nil, fmt.Errorf("%s has multiple values for annotation %v (at most 1 allowed)", + f.Name, StreamingModeKey) + } + for _, value := range anno.Values { + s.IsStreaming = true + switch value { + case StreamingClientSide: + s.ClientStreaming = true + case StreamingServerSide: + s.ServerStreaming = true + case StreamingBidirectional: + s.ClientStreaming = true + s.ServerStreaming = true + s.BidirectionalStreaming = true + case StreamingUnary: + s.Unary = true + default: // other types are not recognized + return nil, fmt.Errorf("invalid value (%s) for annotation %v", value, StreamingModeKey) + } + } + if s.IsStreaming && len(f.Arguments) != 1 { + return nil, fmt.Errorf("streaming function %s should have exactly 1 argument", f.Name) + } + + if s.BidirectionalStreaming { + s.Mode = StreamingBidirectional + } else if s.ServerStreaming { + s.Mode = StreamingServerSide + } else if s.ClientStreaming { + s.Mode = StreamingClientSide + } else if s.Unary { + s.Mode = StreamingUnary + } + } + return s, nil +} diff --git a/generator/golang/templates/client.go b/generator/golang/templates/client.go index 3170c219..d7af92d6 100644 --- a/generator/golang/templates/client.go +++ b/generator/golang/templates/client.go @@ -16,7 +16,7 @@ package templates // Client . var Client = ` -{{define "Client"}} +{{define "ThriftClient"}} {{- UseStdLibrary "thrift"}} {{- $BasePrefix := ServicePrefix .Base}} {{- $BaseService := ServiceName .Base}} @@ -71,6 +71,9 @@ func (p *{{$ClientName}}) Client_() thrift.TClient { {{- $ArgType := .ArgType}} {{- $ResType := .ResType}} func (p *{{$ClientName}}) {{- template "FunctionSignature" . -}} { + {{if .Streaming.IsStreaming -}} + panic("streaming method {{$ServiceName}}.{{.Name}}(mode = {{.Streaming.Mode}}) not available, please use Kitex Thrift Streaming Client.") + {{else -}} var _args {{$ArgType.GoName}} {{- range .Arguments}} _args.{{($ArgType.Field .Name).GoName}} = {{.GoName}} @@ -112,7 +115,25 @@ func (p *{{$ClientName}}) {{- template "FunctionSignature" . -}} { {{- end}} return _result.GetSuccess(), nil {{- end}}{{/* If .Void */}} + {{- end}}{{/* If .Streaming.IsStreaming */ -}} } +{{- if or .Streaming.ClientStreaming .Streaming.ServerStreaming}} +{{- $arg := index .Arguments 0}} +{{- $ResponseType := .FunctionType.Name}} +type {{.Service.GoName}}_{{.Name}}Server interface { + {{- UseStdLibrary "streaming" -}} + streaming.Stream + {{if .Streaming.ClientStreaming }} + Recv() (*{{$arg.Type.Name}}, error) + {{end}} + {{if .Streaming.ServerStreaming}} + Send(*{{$ResponseType}}) error + {{end}} + {{if and .Streaming.ClientStreaming (not .Streaming.ServerStreaming) }} + SendAndClose(*{{$ResponseType}}) error + {{end}} +} +{{- end}}{{/* Streaming */}} {{- end}}{{/* range .Functions */}} -{{- end}}{{/* define "Client" */}} +{{- end}}{{/* define "ThriftClient" */}} ` diff --git a/generator/golang/templates/file.go b/generator/golang/templates/file.go index bc91e61c..c4b9ab4f 100644 --- a/generator/golang/templates/file.go +++ b/generator/golang/templates/file.go @@ -48,12 +48,12 @@ import ( {{- end}} {{- range .Services}} -{{template "Service" .}} -{{template "Client" .}} +{{template "ThriftService" .}} +{{template "ThriftClient" .}} {{- end}} {{- range .Services}} -{{template "Processor" .}} +{{template "ThriftProcessor" .}} {{- end}} {{- if Features.GenerateReflectionInfo}} diff --git a/generator/golang/templates/processor.go b/generator/golang/templates/processor.go index 542d1720..11ee798b 100644 --- a/generator/golang/templates/processor.go +++ b/generator/golang/templates/processor.go @@ -16,7 +16,7 @@ package templates // Processor . var Processor = ` -{{define "Processor"}} +{{define "ThriftProcessor"}} {{- UseStdLibrary "thrift"}} {{- $BasePrefix := ServicePrefix .Base}} {{- $BaseService := ServiceName .Base}} @@ -90,6 +90,9 @@ type {{$ProcessorName | Unexport}}{{$FuncName}} struct { {{- UseStdLibrary "context"}} func (p *{{$ProcessName}}) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + {{if .Streaming.IsStreaming -}} + panic("streaming method {{$ServiceName}}.{{.Name}}(mode = {{.Streaming.Mode}}) not available, please use Kitex Thrift Streaming Client.") + {{else -}} args := {{$ArgType.GoName}}{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() @@ -165,6 +168,7 @@ func (p *{{$ProcessName}}) Process(ctx context.Context, seqId int32, iprot, opro } return true, err {{- end}}{{/* if .Oneway */}} + {{- end -}}{{- /* end if not Has Streaming */ -}} } {{- end}}{{/* range .Functions */}} @@ -180,5 +184,5 @@ func (p *{{$ProcessName}}) Process(ctx context.Context, seqId int32, iprot, opro {{- $_ := (SetWithFieldMask $withFieldMask) }} {{- end}} {{- end}}{{/* range .Functions */}} -{{- end}}{{/* define "Processor" */}} +{{- end}}{{/* define "ThriftProcessor" */}} ` diff --git a/generator/golang/templates/service.go b/generator/golang/templates/service.go index 7d212c25..1818f532 100644 --- a/generator/golang/templates/service.go +++ b/generator/golang/templates/service.go @@ -17,21 +17,30 @@ package templates // FunctionSignature . var FunctionSignature = ` {{define "FunctionSignature"}} -{{- UseStdLibrary "context"}} {{- $Function := .}} -{{- .GoName}}(ctx context.Context +{{- if or .Streaming.ClientStreaming .Streaming.ServerStreaming}} + {{- $arg := index .Arguments 0}} + {{- .GoName}}( + {{- if and .Streaming.ServerStreaming (not .Streaming.ClientStreaming) -}} + req *{{$arg.Type}}, + {{- end -}} + stream {{.Service.GoName}}_{{.Name}}Server) (err error) +{{- else -}} + {{- UseStdLibrary "context" -}} + {{- .GoName}}(ctx context.Context {{- range .Arguments -}} , {{.GoName}} {{.GoTypeName}} {{- end -}} ) ( {{- if not .Void}}r {{.ResponseGoTypeName}}, {{- end -}} err error) +{{- end -}}{{/* end if streaming */}} {{- end}}{{/* define "FunctionSignature" */}} ` // Service . var Service = ` -{{define "Service"}} +{{define "ThriftService"}} {{- $BasePrefix := ServicePrefix .Base}} {{- $BaseService := ServiceName .Base}} {{- $ServiceName := .GoName}} @@ -47,5 +56,5 @@ type {{$ServiceName}} interface { {{template "FunctionSignature" .}} {{- end}} } -{{- end}}{{/* define "Service" */}} +{{- end}}{{/* define "ThriftService" */}} ` diff --git a/generator/golang/templates/slim/slim.go b/generator/golang/templates/slim/slim.go index 4c9e8c9d..969efcb9 100644 --- a/generator/golang/templates/slim/slim.go +++ b/generator/golang/templates/slim/slim.go @@ -119,12 +119,31 @@ func (p *{{$TypeName}}) Error() string { ` Client = ` -{{define "Client"}} +{{define "ThriftClient"}} {{InsertionPoint "slim.Client"}} -{{end}}{{/* define "Client" */}}` +{{- range .Functions}} +{{- if or .Streaming.ClientStreaming .Streaming.ServerStreaming}} +{{- $arg := index .Arguments 0}} +{{- $ResponseType := .FunctionType.Name}} +type {{.Service.GoName}}_{{.Name}}Server interface { + {{- UseStdLibrary "streaming" -}} + streaming.Stream + {{if .Streaming.ClientStreaming }} + Recv() (*{{$arg.Type.Name}}, error) + {{end}} + {{if .Streaming.ServerStreaming}} + Send(*{{$ResponseType}}) error + {{end}} + {{if and .Streaming.ClientStreaming (not .Streaming.ServerStreaming) }} + SendAndClose(*{{$ResponseType}}) error + {{end}} +} +{{- end}}{{/* Streaming */}} +{{- end}}{{/* range .Functions */}} +{{end}}{{/* define "ThriftClient" */}}` Processor = ` -{{define "Processor"}} +{{define "ThriftProcessor"}} {{InsertionPoint "slim.Processor"}} {{$throws := ServiceThrows .}} {{- if $throws}} @@ -135,6 +154,6 @@ _ error = ({{.GoTypeName}})(nil) {{- end}}{{/* range $throws */}} ) {{- end}}{{/* if $throws */}} -{{- end}}{{/* define "Processor" */}} +{{- end}}{{/* define "ThriftProcessor" */}} ` ) diff --git a/generator/golang/util.go b/generator/golang/util.go index 7c56f525..9f169b96 100644 --- a/generator/golang/util.go +++ b/generator/golang/util.go @@ -47,6 +47,7 @@ const ( ThriftOptionLib = "github.com/cloudwego/thriftgo/option" defaultTemplate = "default" ThriftJSONUtilLib = "github.com/cloudwego/thriftgo/utils/json_utils" + KitexStreamingLib = "github.com/cloudwego/kitex/pkg/streaming" ) var escape = regexp.MustCompile(`\\.`) diff --git a/parser/AST.go b/parser/AST.go index f13403ae..f59cbee4 100644 --- a/parser/AST.go +++ b/parser/AST.go @@ -1,4 +1,4 @@ -// Code generated by thriftgo (0.1.7). DO NOT EDIT. +// Code generated by thriftgo (0.2.12). DO NOT EDIT. package parser @@ -6,7 +6,6 @@ import ( "database/sql" "database/sql/driver" "fmt" - "github.com/cloudwego/thriftgo/generator/golang/extension/meta" ) diff --git a/test/golang/cases_and_options/go.mod b/test/golang/cases_and_options/go.mod index 707d2c7f..3ce04481 100644 --- a/test/golang/cases_and_options/go.mod +++ b/test/golang/cases_and_options/go.mod @@ -2,9 +2,6 @@ module example.com/test go 1.17 -require ( - github.com/apache/thrift v0.13.0 - github.com/cloudwego/thriftgo v0.0.0-00010101000000-000000000000 -) +require github.com/apache/thrift v0.13.0 replace github.com/cloudwego/thriftgo => ../../.. diff --git a/test/golang/cases_and_options/go.sum b/test/golang/cases_and_options/go.sum index cbc2820a..171755b6 100644 --- a/test/golang/cases_and_options/go.sum +++ b/test/golang/cases_and_options/go.sum @@ -1,29 +1,2 @@ github.com/apache/thrift v0.13.0 h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/dlclark/regexp2 v1.10.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/version/version.go b/version/version.go index 2b40d2d9..bd7dc120 100644 --- a/version/version.go +++ b/version/version.go @@ -14,4 +14,4 @@ package version -const ThriftgoVersion = "0.3.4" +const ThriftgoVersion = "0.3.5"