File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,23 +26,23 @@ func (t *Time) MarshalJSON() ([]byte, error) {
2626
2727// UnmarshalText implements the encoding.TextUnmarshaler interface.
2828// The time is expected to be in Deis' datetime format.
29- func (t * Time ) UnmarshalText (data []byte ) ( err error ) {
29+ func (t * Time ) UnmarshalText (data []byte ) error {
3030 tt , err := time .Parse (DeisDatetimeFormat , string (data ))
3131 if _ , ok := err .(* time.ParseError ); ok {
3232 tt , err = time .Parse (PyOpenSSLTimeDateTimeFormat , string (data ))
3333 }
3434 * t = Time {tt }
35- return
35+ return err
3636}
3737
3838// UnmarshalJSON implements the json.Unmarshaler interface.
3939// The time is expected to be a quoted string in Deis' datetime format.
40- func (t * Time ) UnmarshalJSON (data []byte ) ( err error ) {
40+ func (t * Time ) UnmarshalJSON (data []byte ) error {
4141 // Fractional seconds are handled implicitly by Parse.
4242 tt , err := time .Parse (`"` + DeisDatetimeFormat + `"` , string (data ))
4343 if _ , ok := err .(* time.ParseError ); ok {
4444 tt , err = time .Parse (`"` + PyOpenSSLTimeDateTimeFormat + `"` , string (data ))
4545 }
4646 * t = Time {tt }
47- return
47+ return err
4848}
You can’t perform that action at this time.
0 commit comments