ucl/cmdlang/objs.go

18 lines
344 B
Go
Raw Normal View History

2024-04-10 10:45:58 +00:00
package cmdlang
import "context"
type invocationArgs struct {
args []string
}
type invokable interface {
invoke(ctx context.Context, args invocationArgs) error
}
type invokableFunc func(ctx context.Context, args invocationArgs) error
func (i invokableFunc) invoke(ctx context.Context, args invocationArgs) error {
return i(ctx, args)
}