From df60c32286fa862de1a5e321fcaec2ff02e18e45 Mon Sep 17 00:00:00 2001 From: sundb Date: Thu, 16 Jul 2020 14:19:18 +0800 Subject: [PATCH] kv: fix typos (#18626) Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com> --- kv/sandbox.go | 2 +- kv/sandbox_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kv/sandbox.go b/kv/sandbox.go index 90130e87b0..ce539bec16 100644 --- a/kv/sandbox.go +++ b/kv/sandbox.go @@ -78,7 +78,7 @@ func (sb *sandbox) UpdateFlags(key []byte, flags KeyFlags) { func (sb *sandbox) PutWithFlags(key []byte, flags KeyFlags, value []byte) { if sb.frozen { - panic("cannot write to a sandbox when it has forked a new sanbox") + panic("cannot write to a sandbox when it has forked a new sandbox") } head := sb.getHead() diff --git a/kv/sandbox_test.go b/kv/sandbox_test.go index efa8954202..e0f0b6f2c5 100644 --- a/kv/sandbox_test.go +++ b/kv/sandbox_test.go @@ -86,7 +86,7 @@ func (s testMemDBSuite) TestIterator(c *C) { func (s testMemDBSuite) TestRuntimeAssertion(c *C) { p := NewSandbox() p1 := p.Derive() - c.Check(func() { p.Put([]byte{0}, []byte{}) }, Panics, "cannot write to a sandbox when it has forked a new sanbox") + c.Check(func() { p.Put([]byte{0}, []byte{}) }, Panics, "cannot write to a sandbox when it has forked a new sandbox") c.Check(func() { p.Derive() }, Panics, "cannot start second sandbox") c.Check(func() { p.Discard() }, Panics, "root sandbox is freezed") p1.Discard()