Compare commits

..

1 commit

Author SHA1 Message Date
Sergey Vasiliev
a19d52c58f
Merge 6e54f647f0 into 0e69d5cd53 2024-04-05 10:34:31 +10:00
4 changed files with 6 additions and 4 deletions

View file

@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
go: [ '1.10.x', '1.19', '1.20', '1.21', '1.22', '1.x' ] go: [ '1.7.x', '1.18', '1.19', '1.20', '1.21', '1.x' ]
name: Go ${{ matrix.go }} name: Go ${{ matrix.go }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View file

@ -22,7 +22,7 @@ Run `go get github.com/shopspring/decimal`
## Requirements ## Requirements
Decimal library requires Go version `>=1.10` Decimal library requires Go version `>=1.7`
## Usage ## Usage

View file

@ -1414,7 +1414,9 @@ func (d Decimal) IntPart() int64 {
// BigInt returns integer component of the decimal as a BigInt. // BigInt returns integer component of the decimal as a BigInt.
func (d Decimal) BigInt() *big.Int { func (d Decimal) BigInt() *big.Int {
scaledD := d.rescale(0) scaledD := d.rescale(0)
return scaledD.value i := &big.Int{}
i.SetString(scaledD.String(), 10)
return i
} }
// BigFloat returns decimal as BigFloat. // BigFloat returns decimal as BigFloat.

2
go.mod
View file

@ -1,3 +1,3 @@
module github.com/shopspring/decimal module github.com/shopspring/decimal
go 1.10 go 1.7