Documentation
¶
Index ¶
- func DateRangesOverlap(startTimeA, endTimeA, startTimeB, endTimeB time.Time) bool
- func DecApproxEqual(a, b sdk.Dec) bool
- func GetShareValue(amount sdk.Int, ratio sdk.Dec) sdk.Int
- func MustParseRFC3339(s string) time.Time
- func PP(data interface{})
- func ParseCoin(s string) sdk.Coin
- func ParseCoins(s string) sdk.Coins
- func ParseDec(s string) sdk.Dec
- func ParseTime(s string) time.Time
- func RandomDec(r *rand.Rand, min, max sdk.Dec) sdk.Dec
- func RandomInt(r *rand.Rand, min, max sdk.Int) sdk.Int
- type StrIntMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DateRangesOverlap ¶
DateRangesOverlap returns true if two date ranges overlap each other. End time is exclusive and start time is inclusive.
func DecApproxEqual ¶
DecApproxEqual returns true if a and b are approximately equal, which means the diff ratio is equal or less than 0.1%.
func GetShareValue ¶
GetShareValue multiplies with truncation by receiving int amount and decimal ratio and returns int result.
func MustParseRFC3339 ¶
MustParseRFC3339 parses string time to time in RFC3339 format.
Types ¶
Click to show internal directories.
Click to hide internal directories.