From 0f2501dcbd52f729a7fe583ff6817eff8d8fbfd8 Mon Sep 17 00:00:00 2001 From: Jan Bader Date: Sat, 19 Feb 2022 21:28:18 +0000 Subject: [PATCH] Rename parameter to other --- postgres/numeric.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/postgres/numeric.go b/postgres/numeric.go index 6f89f81..bcec717 100644 --- a/postgres/numeric.go +++ b/postgres/numeric.go @@ -54,13 +54,13 @@ func (n Numeric) MatchExp(exp int32) Numeric { }} } -func (n Numeric) Sub(o Numeric) Numeric { +func (n Numeric) Sub(other Numeric) Numeric { left := n - right := o - if n.Exp < o.Exp { - right = o.MatchExp(n.Exp) - } else if n.Exp > o.Exp { - left = n.MatchExp(o.Exp) + right := other + if n.Exp < other.Exp { + right = other.MatchExp(n.Exp) + } else if n.Exp > other.Exp { + left = n.MatchExp(other.Exp) } if left.Exp == right.Exp { @@ -73,13 +73,13 @@ func (n Numeric) Sub(o Numeric) Numeric { panic("Cannot subtract with different exponents") } -func (n Numeric) Add(o Numeric) Numeric { +func (n Numeric) Add(other Numeric) Numeric { left := n - right := o - if n.Exp < o.Exp { - right = o.MatchExp(n.Exp) - } else if n.Exp > o.Exp { - left = n.MatchExp(o.Exp) + right := other + if n.Exp < other.Exp { + right = other.MatchExp(n.Exp) + } else if n.Exp > other.Exp { + left = n.MatchExp(other.Exp) } if left.Exp == right.Exp {