Skip to content

Commit

Permalink
remove string kind convert
Browse files Browse the repository at this point in the history
  • Loading branch information
demoManito committed Mar 16, 2024
1 parent 24ae8ae commit 9d25284
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions encoding/form/proto_encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,12 @@ func EncodeField(fieldDescriptor protoreflect.FieldDescriptor, value protoreflec
}
desc := fieldDescriptor.Enum().Values().ByNumber(value.Enum())
return string(desc.Name()), nil
case protoreflect.StringKind:
return value.String(), nil
case protoreflect.BytesKind:
return base64.URLEncoding.EncodeToString(value.Bytes()), nil
case protoreflect.MessageKind, protoreflect.GroupKind:
return encodeMessage(fieldDescriptor.Message(), value)
default:
return fmt.Sprint(value.Interface()), nil
return value.String(), nil
}
}

Expand Down

0 comments on commit 9d25284

Please sign in to comment.