You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: cloudformation-type.go
    path of file: ./repos/aws-nuke/resources
    
    the code of the file until where you have to start completion: package resources

import (
	"fmt"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/cloudformation"
	"github.com/aws/aws-sdk-go/service/cloudformation/cloudformationiface"
	"github.com/rebuy-de/aws-nuke/v2/pkg/types"
	"github.com/sirupsen/logrus"
)

func init() {
	register("CloudFormationType", ListCloudFormationTypes)
}

func ListCloudFormationTypes(sess *session.Session) ([]Resource, error) {
	svc := cloudformation.New(sess)

	params := &cloudformation.ListTypesInput{}
	resources := make([]Resource, 0)

	for {
		resp, err := svc.ListTypes(params)
		if err != nil {
			return nil, err
		}
		for _, typeSummary := range resp.TypeSummaries {
			resources = append(resources, &CloudFormationType{
				svc:         svc,
				typeSummary: typeSummary,
			})
		}

		if resp.NextToken == nil {
			break
		}

		params.NextToken = resp.NextToken
	}

	return resources, nil
}

type CloudFormationType struct {
	svc         cloudformationiface.CloudFormationAPI
	typeSumm
    
func (cfs *CloudFormationType) Remove() error {
	typeVersionSummaries, loadErr := cfs.findAllVersionSummaries()
	if loadErr != nil {
		return loadErr
	}

	failed := false
	for _, typeVersionSummary := range typeVersionSummaries {
		if *typeVersionSummary.IsDefaultVersion {
			logrus.Infof("CloudFormationType ignoring default version type=%s version=%s", *cfs.typeSummary.TypeArn, *typeVersionSummary.VersionId)
		} else {
			logrus.Infof("CloudFormationType removing type=%s version=%s", *cfs.typeSummary.TypeArn, *typeVersionSummary.VersionId)
			if _, err := cfs.svc.DeregisterType(&cloudformation.DeregisterTypeInput{
				VersionId: typeVersionSummary.VersionId,
				TypeName:  typeVersionSummary.TypeName,
				Type:      typeVersionSummary.Type,
			}); err != nil {
				logrus.Errorf("CloudFormationType failed removing type=%s version=%s type=%s arn=%s error=%s", *cfs.typeSummary.TypeName, *typeVersionSummary.VersionId, *typeVersionSummary.Type, *cfs.typeSummary.TypeArn, err.Error())
				failed = true
			}
		}
	}

	if failed {
		return fmt.Errorf("Unable to remove all CloudFormationType versions arn=%s", *cfs.typeSummary.TypeArn)
	}

	_, err := cfs.svc.DeregisterType(&cloudformation.DeregisterTypeInput{
		Arn: cfs.typeSummary.TypeArn,
	})

	return err
}