Documentation ¶
Index ¶
- Constants
- func AdaptStake(stake float64, currency float64, roundValue float64) float64
- func Compare(a string, b string) float64
- func FloatToStr(value float64) string
- func Int64InList(needle int64, haystack []int64) bool
- func MaxFloat(values ...float64) (max float64)
- func Normalize(s string) string
- func PtrFloat64(v float64) *float64
- func PtrString(v string) *string
- func RoundDown(value float64, roundValue float64) float64
- func StringInList(needle string, haystack []string) bool
- func TimeId(seed int8) int64
- func ToUSD(value float64, currency float64) float64
- func ToUSDInt(value float64, currency float64) int64
- func TruncateFloat(value float64, precision int32) float64
- func UnixMsNow() int64
- func UnixUsNow() int64
Constants ¶
View Source
const ISOFormat = "2006-01-02 15:04:05-07:00"
Variables ¶
This section is empty.
Functions ¶
func FloatToStr ¶
func Int64InList ¶
func PtrFloat64 ¶
func StringInList ¶
func TruncateFloat ¶
Truncate truncates off digits from the number, without rounding.
NOTE: precision is the last digit that will not be truncated (must be >= 0).
Example:
decimal.NewFromString("123.456").Truncate(2).String() // "123.45"
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.