func MergePlans(plans []Plan) (*Plan, error) {
	var err error
	masterPlan := &Plan{}
	if len(plans) == 1 {
		return &plans[0], nil
	}
	if len(plans) == 0 {
		return masterPlan, fmt.Errorf("at least one plan is required")
	}
	for _, plan := range plans {
		mergeErr := mergo.Merge(masterPlan, plan, mergo.WithOverride)
		if mergeErr != nil {
			return masterPlan, mergeErr
		}
	}
	patchSecrets(masterPlan, plans)
	return masterPlan, err
}
MergePlans combines one or more plan with a manual merge for
the list of secrets.
package types
import (
	"fmt"
	"github.com/imdario/mergo"
	"github.com/jinzhu/copier"
)