Skip to content

Commit

Permalink
Merge pull request #610 from uber/header-propogate-bug
Browse files Browse the repository at this point in the history
fix header propagate bug
  • Loading branch information
argouber committed Jul 18, 2019
2 parents 2f46873 + f39ab07 commit 073a751
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion codegen/header_propagate.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func typeSwitch(key, gotype string, field *compile.FieldSpec) []string {
assignVal = "v"
case "int16":
typeParse = "strconv.ParseInt(key, 10, 16)"
assignVal = "v"
assignVal = "val"
typeCast = "val := int16(v)\n"
case "int32":
typeParse = "strconv.ParseInt(key, 10, 32)"
Expand Down
4 changes: 2 additions & 2 deletions codegen/header_propagate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,13 +403,13 @@ func TestPrimaryType(t *testing.T) {
if key, ok := headers.Get("x-int"); ok {
if v, err := strconv.ParseInt(key,10,16); err == nil {
val:=int16(v)
in.I5=v
in.I5=val
}
}
if key, ok := headers.Get("x-int"); ok {
if v, err := strconv.ParseInt(key,10,16); err == nil {
val:=int16(v)
in.I6=&v
in.I6=&val
}
}
if key, ok := headers.Get("x-string"); ok {
Expand Down

0 comments on commit 073a751

Please sign in to comment.