diff options
| author | 2025-11-16 00:00:00 +0000 | |
|---|---|---|
| committer | 2025-11-16 00:00:00 +0000 | |
| commit | d944abb28ea70d98d36598a1f30c3738a431013e (patch) | |
| tree | 23347a489b7668cbc2d754ecc2c010acfde0b7d0 /ident.go | |
| parent | Rename ObjType -> ObjectType (diff) | |
| signature | ||
All Serialize should be able to error out
Diffstat (limited to 'ident.go')
| -rw-r--r-- | ident.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -94,7 +94,7 @@ func parseIdent(line []byte) (*Ident, error) { } // Serialize renders an Ident into canonical Git format. -func (ident Ident) Serialize() []byte { +func (ident Ident) Serialize() ([]byte, error) { var b strings.Builder b.Grow(len(ident.Name) + len(ident.Email) + 32) b.Write(ident.Name) @@ -113,7 +113,7 @@ func (ident Ident) Serialize() []byte { hh := offset / 60 mm := offset % 60 fmt.Fprintf(&b, "%c%02d%02d", sign, hh, mm) - return []byte(b.String()) + return []byte(b.String()), nil } // When returns the timestamp as time.Time using the embedded offset. |
