Skip to content

Commit

Permalink
runtime: rewrite query.go in new protoreflect
Browse files Browse the repository at this point in the history
  • Loading branch information
johanbrandhorst committed May 7, 2020
1 parent e86fbdb commit 3b54229
Show file tree
Hide file tree
Showing 3 changed files with 228 additions and 338 deletions.
14 changes: 14 additions & 0 deletions runtime/marshal_jsonpb.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,3 +260,17 @@ var allowUnknownFields = true
func DisallowUnknownFields() {
allowUnknownFields = false
}

var (
convFromType = map[reflect.Kind]reflect.Value{
reflect.String: reflect.ValueOf(String),
reflect.Bool: reflect.ValueOf(Bool),
reflect.Float64: reflect.ValueOf(Float64),
reflect.Float32: reflect.ValueOf(Float32),
reflect.Int64: reflect.ValueOf(Int64),
reflect.Int32: reflect.ValueOf(Int32),
reflect.Uint64: reflect.ValueOf(Uint64),
reflect.Uint32: reflect.ValueOf(Uint32),
reflect.Slice: reflect.ValueOf(Bytes),
}
)
Loading

0 comments on commit 3b54229

Please sign in to comment.