diff --git a/tools/goctl/internal/errorx/errorx.go b/tools/goctl/internal/errorx/errorx.go index 26990b85..4d0e8707 100644 --- a/tools/goctl/internal/errorx/errorx.go +++ b/tools/goctl/internal/errorx/errorx.go @@ -12,6 +12,7 @@ var errorFormat = `goctl: generation error: %+v goctl version: %s %s` +// GoctlError represents a goctl error. type GoctlError struct { message []string err error diff --git a/tools/goctl/internal/version/version.go b/tools/goctl/internal/version/version.go index 11c0ae2e..20a32e24 100644 --- a/tools/goctl/internal/version/version.go +++ b/tools/goctl/internal/version/version.go @@ -5,7 +5,8 @@ import ( "strings" ) -const BuildVersion = "1.1.11-beta-2" +// BuildVersion is the version of goctl. +const BuildVersion = "1.2.0" // GetGoctlVersion returns BuildVersion func GetGoctlVersion() string { diff --git a/zrpc/internal/serverinterceptors/tracinginterceptor.go b/zrpc/internal/serverinterceptors/tracinginterceptor.go index b2fa6291..9ae9cdf1 100644 --- a/zrpc/internal/serverinterceptors/tracinginterceptor.go +++ b/zrpc/internal/serverinterceptors/tracinginterceptor.go @@ -8,7 +8,8 @@ import ( "google.golang.org/grpc/metadata" ) -// UnaryTracingInterceptor returns a func that handles tracing with given service name. +// UnaryTracingInterceptor returns a grpc.UnaryServerInterceptor +// that handles tracing with given service name. func UnaryTracingInterceptor(serviceName string) grpc.UnaryServerInterceptor { return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { @@ -28,6 +29,8 @@ func UnaryTracingInterceptor(serviceName string) grpc.UnaryServerInterceptor { } } +// StreamTracingInterceptor returns a grpc.StreamServerInterceptor +// that handles tracing with given service name. func StreamTracingInterceptor(serviceName string) grpc.StreamServerInterceptor { return func(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error {