On Sat, Jul 22, 2017 at 5:54 AM, SerginRamos <[email protected]> wrote: > > When reading the Time.go function, I found this non-usual code: > > Time.go: Line: 116-124 > > // String returns the English name of the month ("January", "February", > ...). > func (m Month) String() string { > if January <= m && m <= December { > return months[m-1] > } > buf := make([]byte, 20) > n := fmtInt(buf, uint64(m)) > return "%!Month(" + string(buf[n:]) + ")" > } > > I think this may be: > if January >= m && m <= December { > > Am I wrong?
Well, yes, I think you are. Try it with different values of m. Ian -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
