From b6bd4f230a1130c6c129e18cdc7b35a19659cd71 Mon Sep 17 00:00:00 2001 From: Tsachi Herman <24438559+tsachiherman@users.noreply.github.com> Date: Wed, 9 Oct 2024 11:06:56 -0400 Subject: [PATCH] Update state/recorder.go Co-authored-by: aaronbuchwald Signed-off-by: Tsachi Herman <24438559+tsachiherman@users.noreply.github.com> --- state/recorder.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/state/recorder.go b/state/recorder.go index d5e533bc25..ca31f916c8 100644 --- a/state/recorder.go +++ b/state/recorder.go @@ -49,9 +49,8 @@ func (r *Recorder) checkState(ctx context.Context, key []byte) ([]byte, error) { func (r *Recorder) Insert(ctx context.Context, key []byte, value []byte) error { stringKey := string(key) - var stateKeyVal []byte - var err error - if stateKeyVal, err = r.checkState(ctx, key); err != nil { + stateKeyVal, err := r.checkState(ctx, key) + if err != nil { return err }