Update comment for Scan (#75)

Signed-off-by: lucklove <gnu.crazier@gmail.com>
This commit is contained in:
SIGSEGV 2021-04-12 13:55:29 +08:00 committed by GitHub
parent 1be793c468
commit d811a08025
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -310,7 +310,7 @@ func (c *Client) DeleteRange(ctx context.Context, startKey []byte, endKey []byte
// If endKey is empty, it means unbounded.
// If you want to exclude the startKey or include the endKey, append a '\0' to the key. For example, to scan
// (startKey, endKey], you can write:
// `Scan(append(startKey, '\0'), append(endKey, '\0'), limit)`.
// `Scan(ctx, append(startKey, '\x00'), append(endKey, '\x00'), limit)`.
func (c *Client) Scan(ctx context.Context, startKey, endKey []byte, limit int, options ...ScanOption) (keys [][]byte, values [][]byte, err error) {
start := time.Now()
defer func() { metrics.RawkvCmdHistogram.WithLabelValues("scan").Observe(time.Since(start).Seconds()) }()