# Functions
FloatFromString format.
FormatDecimalFloat64 获取精度计算后的数量
example FormatDecimalFloat64(123.456, -2) // output: 123.46 FormatDecimalFloat64(123.456, 1) // output: 120 FormatDecimalFloat64(-500,-2) // output: -500 FormatDecimalFloat64(-500,0) // output: -500 FormatDecimalFloat64(1.1001, -2) // output: 1.1 FormatDecimalFloat64(1.454, -1) // output: 1.5 FormatDecimalFloat64(1.454, 0) // output: 1.
三元表达式简单应用,为了便于程序易读
example If(a>b,a,b).(int).
JSONDecode decodes JSON data into a structure.
ReadFile reads a file and returns read data as byte array.
StartEndTimeCheck provides some basic checks which occur frequently in the codebase.
# Variables
ErrDateUnset is an error for start end check calculations.
ErrStartAfterEnd is an error for start end check calculations.
ErrStartAfterTimeNow is an error for start end check calculations.
ErrStartEqualsEnd is an error for start end check calculations.