Chore: Remove xorcare/pointer dependency (#63900)

* Chore: remove pointer dependency

* fix type casts

* deprecate xorcare/pointer library in linter

* rooky mistake
This commit is contained in:
Serge Zaitsev
2023-03-06 05:23:15 -05:00
committed by GitHub
parent 30c6ac49ba
commit 0bdb105df2
23 changed files with 469 additions and 471 deletions
+4 -5
View File
@@ -11,7 +11,6 @@ import (
"github.com/grafana/grafana-plugin-sdk-go/data"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
ptr "github.com/xorcare/pointer"
"github.com/grafana/grafana/pkg/expr/mathexp"
"github.com/grafana/grafana/pkg/expr/mathexp/parse"
@@ -105,9 +104,9 @@ func TestReduceExecute(t *testing.T) {
t.Run("should noop if Number", func(t *testing.T) {
var numbers mathexp.Values = []mathexp.Value{
mathexp.GenerateNumber(ptr.Float64(rand.Float64())),
mathexp.GenerateNumber(ptr.Float64(rand.Float64())),
mathexp.GenerateNumber(ptr.Float64(rand.Float64())),
mathexp.GenerateNumber(util.Pointer(rand.Float64())),
mathexp.GenerateNumber(util.Pointer(rand.Float64())),
mathexp.GenerateNumber(util.Pointer(rand.Float64())),
}
vars := map[string]mathexp.Results{
@@ -202,7 +201,7 @@ func TestResampleCommand_Execute(t *testing.T) {
isError: true,
}, {
name: "should return error when input Scalar",
vals: mathexp.NewScalar("test", ptr.Float64(rand.Float64())),
vals: mathexp.NewScalar("test", util.Pointer(rand.Float64())),
isError: true,
},
}