From 3253ac8324d995b6ab1c993e42e425ee21050aaf Mon Sep 17 00:00:00 2001 From: Nicholas Page Date: Wed, 28 May 2025 08:52:14 -0700 Subject: [PATCH] Add the missing NewFloatSliceResult for testing --- result.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/result.go b/result.go index cfd4cf92ed..3e0d0a1348 100644 --- a/result.go +++ b/result.go @@ -82,6 +82,14 @@ func NewBoolSliceResult(val []bool, err error) *BoolSliceCmd { return &cmd } +// NewFloatSliceResult returns a FloatSliceCmd initialised with val and err for testing. +func NewFloatSliceResult(val []float64, err error) *FloatSliceCmd { + var cmd FloatSliceCmd + cmd.val = val + cmd.SetErr(err) + return &cmd +} + // NewMapStringStringResult returns a MapStringStringCmd initialised with val and err for testing. func NewMapStringStringResult(val map[string]string, err error) *MapStringStringCmd { var cmd MapStringStringCmd