Skip to content

Commit

Permalink
[golang] BEO-14061 float32->float64 (#934)
Browse files Browse the repository at this point in the history
Motivation: we lose precision, e.g. `123456876` after conversion to float32 is `123456880`
  • Loading branch information
vstatkevich authored May 16, 2023
1 parent f38a2cb commit 09847f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/GoClientGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ function writeAction($serviceId, $serviceName, DOMElement $actionNode, &$prefixT
$goOutputType = "*int32";
break;
case "float":
$goOutputType = "*float32";
$goOutputType = "*float64";
break;
case "bool":
$goOutputType = "*bool";
Expand Down Expand Up @@ -708,7 +708,7 @@ function getSignature($paramNodes, &$prefixText, &$importedEnums)
$goType = "int32";
break;
case "float":
$goType = "float32";
$goType = "float64";
break;
case "KalturaStringValue":
$goOutputType = "string";
Expand Down Expand Up @@ -979,8 +979,8 @@ private function addClass(DOMElement $classNode)
}
else if ($propType == "float")
{
$goPropType = "float32";
$property["pureType"] = "float32";
$goPropType = "float64";
$property["pureType"] = "float64";
}
else
{
Expand Down

0 comments on commit 09847f2

Please sign in to comment.