From b3bdc9ef7bebbfa47590579b572f64e744004b0f Mon Sep 17 00:00:00 2001 From: Vinicius Fortuna Date: Wed, 6 Nov 2024 18:34:02 -0500 Subject: [PATCH] Apply suggestions from code review Co-authored-by: J. Yi <93548144+jyyi1@users.noreply.github.com> --- transport/split/writer.go | 2 +- x/configurl/split.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/transport/split/writer.go b/transport/split/writer.go index 21d2bf66..352dc0db 100644 --- a/transport/split/writer.go +++ b/transport/split/writer.go @@ -34,7 +34,7 @@ type splitWriterReaderFrom struct { var _ io.ReaderFrom = (*splitWriterReaderFrom)(nil) -// Split Iterator is a function that returns how many bytes until the next split point, or zero if there are no more splits to do. +// SplitIterator is a function that returns how many bytes until the next split point, or zero if there are no more splits to do. type SplitIterator func() int64 // NewFixedSplitIterator is a helper function that returns a [SplitIterator] that returns the input number once, followed by zero. diff --git a/x/configurl/split.go b/x/configurl/split.go index 33737fbe..6c01aec8 100644 --- a/x/configurl/split.go +++ b/x/configurl/split.go @@ -50,7 +50,7 @@ func registerSplitStreamDialer(r TypeRegistry[transport.StreamDialer], typeID st } bytes, err = strconv.ParseInt(subparts[1], 10, 64) if err != nil { - return nil, fmt.Errorf("bytes is not a number: %v", subparts[0]) + return nil, fmt.Errorf("bytes is not a number: %v", subparts[1]) } default: return nil, fmt.Errorf("split format must be a comma-separated list of '[$COUNT*]$BYTES' (e.g. '100,5*2'). Got %v", part)