From fe97df5b5843862d8303cd92586065920e8639f6 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 16 Nov 2017 17:08:02 -0500 Subject: s/UserTime/Ident/ --- textproto/types.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'textproto') diff --git a/textproto/types.go b/textproto/types.go index 9a1731b..dd4c48d 100644 --- a/textproto/types.go +++ b/textproto/types.go @@ -9,13 +9,13 @@ import ( // BUG(lukeshu): Only supports the "raw" date format (not "rfc2822" or // "now") -type UserTime struct { +type Ident struct { Name string Email string Time time.Time } -func (ut UserTime) String() string { +func (ut Ident) String() string { if ut.Name == "" { return fmt.Sprintf("<%s> %d %s", ut.Name, @@ -31,8 +31,8 @@ func (ut UserTime) String() string { } } -func ParseUserTime(str string) (UserTime, error) { - ret := UserTime{} +func ParseIdent(str string) (Ident, error) { + ret := Ident{} lt := strings.IndexAny(str, "<>") if lt < 0 || str[lt] != '<' { return ret, fmt.Errorf("Missing < in ident string: %v", str) -- cgit v1.2.3-2-g168b