func MapEventToEffectFactory(statusPolicy policy.Policy) func(events.Event) effects.Effect {
	return func(event events.Event) effects.Effect {
		switch evt := event.(type) {
		case enable.Succeeded, enable.Aborted:
			return statuseventadapter.MapEventToEffect(statusPolicy.Apply())
		case enable.Failed:
			return effects.NewExitErrMsg(foldErrors(evt.Reason))
		default:
			return effects.NewExitOk()
		}
	}
}
MapEventToEffectFactory convert enable events to effects for the cli
package enableeventadapter
import (
	"bytes"
	"errors"
	"strings"
	"github.com/hekmekk/git-team/src/command/enable"
	statuseventadapter "github.com/hekmekk/git-team/src/command/status/cliadapter/event"
	"github.com/hekmekk/git-team/src/core/events"
	"github.com/hekmekk/git-team/src/core/policy"
	"github.com/hekmekk/git-team/src/shared/cli/effects"
)