mirror of
https://github.com/golang/go.git
synced 2026-06-27 19:30:52 +00:00
log/slog: return if error happens
Change-Id: I1780ea2cdc057ecb57bf72551bfd0904c1ad505f
GitHub-Last-Rev: a11799fe16
GitHub-Pull-Request: golang/go#78901
Reviewed-on: https://go-review.googlesource.com/c/go/+/769622
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
8fe0c0eb63
commit
be45023407
1 changed files with 1 additions and 0 deletions
|
|
@ -95,6 +95,7 @@ func appendJSONTime(s *handleState, t time.Time) {
|
|||
// RFC 3339 is clear that years are 4 digits exactly.
|
||||
// See golang.org/issue/4556#c15 for more discussion.
|
||||
s.appendError(errors.New("time.Time year outside of range [0,9999]"))
|
||||
return
|
||||
}
|
||||
s.buf.WriteByte('"')
|
||||
*s.buf = t.AppendFormat(*s.buf, time.RFC3339Nano)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue