Created
November 1, 2016 14:31
-
-
Save kokes/b3adb1e0438b40b8d1b76a90be03e434 to your computer and use it in GitHub Desktop.
Stringers as generated by `stringer` within the time package.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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]] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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