You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It will be great is eg can support generics in a way it can handle e.g. slices of different types.
Example: Replacing a method that takes slices of elements that implements given interface.
package template
import (
"github.com/golang/protobuf/proto""github.com/stackrox/rox/pkg/protoassert""github.com/stretchr/testify/assert""testing"
)
funcbefore[T proto.Message](t*testing.T, a, b []T) bool {
returnassert.Equal(t, a, b)
}
funcafter[T proto.Message](t*testing.T, a, b []T) bool {
returnprotoassert.SlicesEqual(t, a, b)
}
The text was updated successfully, but these errors were encountered:
Proposal Details
It will be great is eg can support generics in a way it can handle e.g. slices of different types.
Example: Replacing a method that takes slices of elements that implements given interface.
The text was updated successfully, but these errors were encountered: