github.com/evolutionlandorg/raffle/algorithm@v0.0.0-20210909083243-054e780956f1/comparator/comparator.go (about)

     1  // Package comparator provides ...
     2  package comparator
     3  
     4  import (
     5  	"math/big"
     6  )
     7  
     8  func BigIntComparator(a, b interface{}) int {
     9  	aAsserted := a.(*big.Int)
    10  	bAsserted := b.(*big.Int)
    11  	return aAsserted.Cmp(bAsserted)
    12  }