@@ -62,15 +62,16 @@ func FromBytes(bts []byte, precision, scale uint32) *big.Int {
6262
6363 v .SetBytes (bts )
6464
65- if neg := bts [0 ]& negMask != 0 ; neg {
65+ neg := bts [0 ]& negMask != 0
66+ if neg { //nolint:ifshort
6667 // Given bytes contains negative value.
6768 // Interpret is as two's complement.
6869 not (v )
6970 v .Add (v , one )
7071 v .Neg (v )
7172 }
7273 if v .CmpAbs (pow (ten , precision )) >= 0 {
73- if neg := bts [ 0 ] & negMask != 0 ; neg {
74+ if neg { //nolint:ifshort
7475 v .Set (neginf )
7576 } else {
7677 v .Set (inf )
@@ -88,9 +89,7 @@ func FromInt128(p [16]byte, precision, scale uint32) *big.Int {
8889
8990// Parse interprets a string s with the given precision and scale and returns
9091// the corresponding big integer.
91- //
92- //nolint:ifshort
93- func Parse (s string , precision , scale uint32 ) (* big.Int , error ) {
92+ func Parse (s string , precision , scale uint32 ) (* big.Int , error ) { //nolint:ifshort
9493 if scale > precision {
9594 return nil , precisionError (s , precision , scale )
9695 }
@@ -192,9 +191,7 @@ func Parse(s string, precision, scale uint32) (*big.Int, error) {
192191
193192// Format returns the string representation of x with the given precision and
194193// scale.
195- //
196- //nolint:ifshort //Can't place variable inside if scope because it's used below
197- func Format (x * big.Int , precision , scale uint32 ) string {
194+ func Format (x * big.Int , precision , scale uint32 ) string { //nolint:ifshort
198195 switch {
199196 case x .CmpAbs (inf ) == 0 :
200197 if x .Sign () < 0 {
@@ -290,8 +287,7 @@ func BigIntToByte(x *big.Int, precision, scale uint32) (p [16]byte) {
290287 return p
291288}
292289
293- //nolint:ifshort //Can't place variable inside if scope because it's used one more time below
294- func put (x * big.Int , p []byte ) {
290+ func put (x * big.Int , p []byte ) { //nolint:ifshort
295291 neg := x .Sign () < 0
296292 if neg {
297293 x = complement (x )
0 commit comments