From d690de5c459f14fe4ecad78bc1f17e9d55f710e4 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 10 Mar 2015 01:44:27 -0700 Subject: [PATCH] Change name from xmlFormat to actual understandable name ``iso8601Format`` --- pkg/s3/xmltime.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/s3/xmltime.go b/pkg/s3/xmltime.go index dfc187af..2f15128f 100644 --- a/pkg/s3/xmltime.go +++ b/pkg/s3/xmltime.go @@ -45,7 +45,7 @@ import ( // Date format const ( - xmlTimeFormat = "2006-01-02T15:04:05.000Z" + iso8601Format = "2006-01-02T15:04:05.000Z" ) type xmlTime struct { @@ -55,17 +55,17 @@ type xmlTime struct { func (c *xmlTime) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { var v string d.DecodeElement(&v, &start) - parse, _ := time.Parse(xmlTimeFormat, v) + parse, _ := time.Parse(iso8601Format, v) *c = xmlTime{parse} return nil } func (c *xmlTime) UnmarshalXMLAttr(attr xml.Attr) error { - t, _ := time.Parse(xmlTimeFormat, attr.Value) + t, _ := time.Parse(iso8601Format, attr.Value) *c = xmlTime{t} return nil } func (c *xmlTime) format() string { - return c.Time.Format(xmlTimeFormat) + return c.Time.Format(iso8601Format) }