From c609828c9b0cdeaf1d5ee5cce12778a3bbf5f829 Mon Sep 17 00:00:00 2001 From: Nicholas Page Date: Tue, 3 Jun 2025 03:27:54 -0700 Subject: [PATCH] chore(tests): add the missing NewFloatSliceResult for testing (#3393) --- result.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/result.go b/result.go index cfd4cf92..3e0d0a13 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