Skip to content

Instantly share code, notes, and snippets.

@kokes
Created November 1, 2016 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kokes/b3adb1e0438b40b8d1b76a90be03e434 to your computer and use it in GitHub Desktop.
Save kokes/b3adb1e0438b40b8d1b76a90be03e434 to your computer and use it in GitHub Desktop.
Stringers as generated by `stringer` within the time package.
// Code generated by "stringer -type Month"; DO NOT EDIT
package time
import "fmt"
const _Month_name = "JanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecember"
var _Month_index = [...]uint8{0, 7, 15, 20, 25, 28, 32, 36, 42, 51, 58, 66, 74}
func (i Month) String() string {
i -= 1
if i < 0 || i >= Month(len(_Month_index)-1) {
return fmt.Sprintf("Month(%d)", i+1)
}
return _Month_name[_Month_index[i]:_Month_index[i+1]]
}
// Code generated by "stringer -type Weekday"; DO NOT EDIT
package time
import "fmt"
const _Weekday_name = "SundayMondayTuesdayWednesdayThursdayFridaySaturday"
var _Weekday_index = [...]uint8{0, 6, 12, 19, 28, 36, 42, 50}
func (i Weekday) String() string {
if i < 0 || i >= Weekday(len(_Weekday_index)-1) {
return fmt.Sprintf("Weekday(%d)", i)
}
return _Weekday_name[_Weekday_index[i]:_Weekday_index[i+1]]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment