Skip to content

Releases: xgfone/go-cast

v0.8.1

14 Aug 03:53
Compare
Choose a tag to compare
  • Fix the integer string check bug.

v0.8.0

02 Apr 07:11
Compare
Choose a tag to compare
  • Added:
    • Add the pure functions like ToXXXPure without trying to use the hook.
    • Allow the user to customize the conversion between the types by the interface, such as interface{ Bool() bool }.
    • Support to convert between time.Duration and ~float(float32 & float64) based on second.
    • Try to use the reflect to support the user-defined basic types, such as type Int int.
  • Changed:
    • Convert float32 and float64 to time.Duration based on second instead of millisecond.

v0.7.0

01 Apr 10:33
Compare
Choose a tag to compare
  • Changed:
    • Rename the module name from cast to go-cast.

v0.6.0

01 Apr 10:33
Compare
Choose a tag to compare

Refactor the codes.

v0.5.1

07 Apr 15:09
Compare
Choose a tag to compare
  • Fixed:
    • ToBool supports []byte{'\x00'} and []byte{'\x01'} as false and true.

v0.5.0

27 Aug 15:29
Compare
Choose a tag to compare
  • Changed:
    • Change ToTime as the short for ToTimeInLocation.
    • Change StringToTime as the short for StringToTimeInLocation.
    • ToTimeInLocation will sets the location of the result time.Time to the given location.
    • StringToTimeInLocation supports the more than one layouts when giving them, and retries them in turn.

v0.4.0

13 Aug 13:36
Compare
Choose a tag to compare
  • Added:
    • Add the interface IsZeror and IsZero supports it.
    • Add the function IsSet to check whether a value is set.

v0.3.1

30 Jul 14:59
Compare
Choose a tag to compare
  • Fixed:
    • IsZero tests each number type respectively to prevent go compiler from taking the constant 0 as the int type.

v0.3.0

16 Jul 14:43
Compare
Choose a tag to compare
  • Added:
    • Add the functions StringToTimeInLocation and ToTimeInLocation to support the specific location when parsing the time string.
  • Changed:
    • Export Layouts as the global variable to allow the user to adjust the order when parsing the time string.

v0.2.1

02 Jul 12:51
Compare
Choose a tag to compare
  • Fixed:
    • Detect the type of the argument by reflect for IsZero.