types

package
v0.1.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DateRangesOverlap

func DateRangesOverlap(startTimeA, endTimeA, startTimeB, endTimeB time.Time) bool

DateRangesOverlap returns true if two date ranges overlap each other. End time is exclusive and start time is inclusive.

func GetShareValue

func GetShareValue(amount sdk.Int, ratio sdk.Dec) sdk.Int

GetShareValue multiplies with truncation by receiving int amount and decimal ratio and returns int result.

func MustParseRFC3339

func MustParseRFC3339(s string) time.Time

MustParseRFC3339 parses string time to time in RFC3339 format.

func PP

func PP(data interface{})

Types

type StrIntMap

type StrIntMap map[string]sdk.Int

func (StrIntMap) AddOrSet

func (m StrIntMap) AddOrSet(key string, value sdk.Int)

AddOrSet Set when the key not existed on the map or add existed value of the key.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL