diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-11-16 17:08:02 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-11-16 17:08:02 -0500 |
commit | fe97df5b5843862d8303cd92586065920e8639f6 (patch) | |
tree | c5084f6771b67ed3c22a65be3f2a06ca03361dba /textproto | |
parent | 2b0bd61baca0d83b31dbea7a8e1a670d30a94a22 (diff) |
s/UserTime/Ident/
Diffstat (limited to 'textproto')
-rw-r--r-- | textproto/types.go | 8 |
1 files changed, 4 insertions, 4 deletions
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) |