MCPcopy Create free account
hub / github.com/OpenPrinting/goipp / parseTime

Function parseTime

encdec_test.go:90–97  ·  view source on GitHub ↗

parseTime parses time given in time.Layout format. this function panics if time cannot be parsed

(s string)

Source from the content-addressed store, hash-verified

88// parseTime parses time given in time.Layout format.
89// this function panics if time cannot be parsed
90func 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

Callers 1

testEncodeDecodeMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected