Bulk move from k8s.io/kubectl

This commit is contained in:
Jeffrey Regan
2018-05-11 14:07:15 -07:00
parent c2048aae17
commit 83b3eb9d54
4223 changed files with 1815034 additions and 110 deletions

View File

@@ -0,0 +1,16 @@
package tests
import (
"testing"
"github.com/modern-go/reflect2"
)
func Test_slice_bytes(t *testing.T) {
t.Run("SetIndex", testOp(func(api reflect2.API) interface{} {
obj := [][]byte{[]byte("hello"), []byte("world")}
valType := api.TypeOf(obj).(reflect2.SliceType)
valType.SetIndex(&obj, 0, []byte("hi"))
valType.SetIndex(&obj, 1, []byte("there"))
return obj
}))
}