That's nice work-around! Thank you Jakob!
Best regards,
:) Hein
On Wednesday, November 22, 2017 at 11:27:34 PM UTC-8, Jakob Borg wrote:
>
> A variable of type [][]Operation has that type and only that type. Your
> Concurrent and Sequential types are convertible to []Operation, and this is
>
A variable of type [][]Operation has that type and only that type. Your
Concurrent and Sequential types are convertible to []Operation, and this is
what happens in the assignment.
You can probably use interfaces to accomplish what you want.
type Operator interface {
Operations() []Operation
}
I have code like this:
type TestCase struct {
Namestring
Description string
OrderOp [][]Operation
}
type Concurrent []Operation
type Sequential []Operation
With the intent to do things like this:
OrderOp: [][]Operation{
Concurrent{
{ID: "A", Name: "Read", ArgumentType: "ReadRequest",