diff options
| author | Oleksandr Redko <oleksandr.red+github@gmail.com> | 2023-02-12 15:37:00 +0200 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-02-16 23:09:19 +0000 |
| commit | 3ad6393f8676b1b408673bf40b8a876f29561eef (patch) | |
| tree | 7338eaf302fd64d9d24e9776999a919e87c71778 /src/time/format.go | |
| parent | 135c470b2277e1c9514ba8a5478408fea0dee8a2 (diff) | |
| download | go-3ad6393f8676b1b408673bf40b8a876f29561eef.tar.xz | |
src: rename unexported errors by adding prefix err
By convention, use `err` as prefix for variables of type `error`.
Change-Id: I9401d5d47e994a27be245b2c8b1edd55cdd52db1
Reviewed-on: https://go-review.googlesource.com/c/go/+/467536
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/time/format.go')
| -rw-r--r-- | src/time/format.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/time/format.go b/src/time/format.go index f94d68ee02..7fbeddb540 100644 --- a/src/time/format.go +++ b/src/time/format.go @@ -446,7 +446,7 @@ func appendInt(b []byte, x int, width int) []byte { } // Never printed, just needs to be non-nil for return by atoi. -var atoiError = errors.New("time: invalid number") +var errAtoi = errors.New("time: invalid number") // Duplicates functionality in strconv, but avoids dependency. func atoi[bytes []byte | string](s bytes) (x int, err error) { @@ -458,7 +458,7 @@ func atoi[bytes []byte | string](s bytes) (x int, err error) { q, rem, err := leadingInt(s) x = int(q) if err != nil || len(rem) > 0 { - return 0, atoiError + return 0, errAtoi } if neg { x = -x |
