On Sat, Jul 1, 2017 at 11:01 AM, Sam Whited <s...@samwhited.com> wrote:
> Check out the documentation for the "Format" function:

Follow up because I only answered part of the question (my apologies):
unfortunately, while Format does allow you to add custom formats, it
won't let you change the padding for 24-hour formats. You could always
format a simple timestamp like this using the generic string
formatting methods:

    fmt.Println(fmt.Sprintf("%d:%02d", t.Hour(), t.Minute()))

—Sam

-- 
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.

Reply via email to