Skip to content

Commit

Permalink
style: translate Chinese comments to English
Browse files Browse the repository at this point in the history
  • Loading branch information
FGYFFFF committed Jul 25, 2022
1 parent 2b28a2e commit d4a63c8
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 23 deletions.
1 change: 0 additions & 1 deletion cmd/hz/internal/config/argument.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ type Argument struct {
Excludes []string
NoRecurse bool

// 第三方layout模板配置
CustomizeLayout string
CustomizePackage string
ModelBackend string
Expand Down
20 changes: 10 additions & 10 deletions cmd/hz/internal/protobuf/api/api.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions cmd/hz/internal/protobuf/api/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ extend google.protobuf.MethodOptions {
optional string options = 50206;
optional string head = 50207;
optional string any = 50208;
optional string gen_path = 50301;
optional string api_version = 50302;
optional string tag = 50303;
optional string name = 50304;
optional string api_level = 50305;
optional string serializer = 50306;
optional string param = 50307;
optional string baseurl = 50308;
optional string gen_path = 50301; // The path specified by the user when the client code is generated, with a higher priority than api_version
optional string api_version = 50302; // Specify the value of the :version variable in path when the client code is generated
optional string tag = 50303; // rpc tag, can be multiple, separated by commas
optional string name = 50304; // Name of rpc
optional string api_level = 50305; // Interface Level
optional string serializer = 50306; // Serialization method
optional string param = 50307; // Whether client requests take public parameters
optional string baseurl = 50308; // Baseurl used in ttnet routing
}

extend google.protobuf.EnumValueOptions {
Expand Down
2 changes: 0 additions & 2 deletions cmd/hz/internal/util/string.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"unsafe"
)

// FIXME: 后面改为用hertz internal下的
func Str2Bytes(in string) (out []byte) {
op := (*reflect.SliceHeader)(unsafe.Pointer(&out))
ip := (*reflect.StringHeader)(unsafe.Pointer(&in))
Expand All @@ -33,7 +32,6 @@ func Str2Bytes(in string) (out []byte) {
return
}

// FIXME: 后面改为用hertz internal下的
func Bytes2Str(in []byte) (out string) {
op := (*reflect.StringHeader)(unsafe.Pointer(&out))
ip := (*reflect.SliceHeader)(unsafe.Pointer(&in))
Expand Down
4 changes: 2 additions & 2 deletions pkg/common/config/request_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ type RequestOptions struct {
isSD bool
}

// RequestOption 是唯一可以用来设置 RequestOption 的类.
// RequestOption is the only struct to set request-level options.
type RequestOption struct {
F func(o *RequestOptions)
}

// NewRequestOptions create a *RequestOptions according to the given opts
// NewRequestOptions create a *RequestOptions according to the given opts.
func NewRequestOptions(opts []RequestOption) *RequestOptions {
options := &RequestOptions{
tags: make(map[string]string),
Expand Down

0 comments on commit d4a63c8

Please sign in to comment.