parseTime parses time given in time.Layout format. this function panics if time cannot be parsed
(s string)
| 88 | // parseTime parses time given in time.Layout format. |
| 89 | // this function panics if time cannot be parsed |
| 90 | func parseTime(s string) Time { |
| 91 | const layout = "01/02 03:04:05PM '06 -0700" // Missed in go 1.11 |
| 92 | t, err := time.Parse(layout, s) |
| 93 | if err != nil { |
| 94 | panic(fmt.Sprintf("parseTime(%q): %s", s, err)) |
| 95 | } |
| 96 | return Time{t} |
| 97 | } |
| 98 | |
| 99 | // testEncodeDecodeMessage creates a quite complex message |
| 100 | // for Encode/Decode test |
no outgoing calls
no test coverage detected