On Sun, Sep 25, 2016 at 6:07 PM Ally Dale <vipa...@gmail.com> wrote: > Exactly, I desired my extension code can be like this: type Duration time.Duration const Duration.Day = Duration(time.Duration.Hour*24) const Duration.Week = Duration(Duration.Day*7)
I'm perhaps missing something, but you can simply define your own typed constants (of type time.Duration) w/o "extending" type time.Duration. const ( Day = time.Hour*24 Week = Day*7 ) BTW: Note that the above values of Day and Week constants are incorrect. That's why they do not exist in package time. -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.