fix slice copy in 1.20 (#13389)

The slices package is added to the standard library in Go 1.21;
we need to import from the exp area to maintain compatibility with Go 1.20.

Signed-off-by: tyltr <tylitianrui@126.com>
This commit is contained in:
tyltr 2024-01-16 19:06:58 +08:00 committed by GitHub
parent 72a8f1084b
commit 1fa131ee03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,10 +15,10 @@ package histogram
import ( import (
"math" "math"
"slices"
"testing" "testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"golang.org/x/exp/slices"
) )
func TestGetBound(t *testing.T) { func TestGetBound(t *testing.T) {