serverlessworkflow/sdk-go

states.go:66:12: unsupported AST kind *ast.InterfaceType

spolti opened this issue · 0 comments

What happened:

Interface types are not well handled by the operator-sdk controller gen. In cases similar to:

// State definition for a Workflow state
type State interface {
	GetID() string
	GetName() string
	GetType() StateType
	GetOnErrors() []OnError
	GetTransition() *Transition
	GetStateDataFilter() *StateDataFilter
	GetCompensatedBy() string
	GetUsedForCompensation() bool
	GetEnd() *End
	GetMetadata() *Metadata
	// DeepCopyState fixes undefined (type State has no field or method DeepCopyState)
	DeepCopyState() State
}

While trying to build the Operator a similar issue will happen:

github.com/serverlessworkflow/sdk-go/model/states.go:66:12: unsupported AST kind *ast.InterfaceType