func GetAllTransitGateways(svc *ec2.Client) []TransitGateway {
	var result []TransitGateway
	resp, err := svc.DescribeTransitGateways(context.TODO(), &ec2.DescribeTransitGatewaysInput{})
	if err != nil {
		panic(err)
	}
	for _, tgw := range resp.TransitGateways {
		tgwobject := TransitGateway{
			ID:          *tgw.TransitGatewayId,
			AccountID:   *tgw.OwnerId,
			Name:        getNameFromTags(tgw.Tags),
			RouteTables: GetRouteTablesForTransitGateway(*tgw.TransitGatewayId, svc),
		}
		result = append(result, tgwobject)
	}
	return result
}
// GetAllTransitGateways returns an array of all Transit Gateways in the account
GetAllTransitGateways returns an array of all Transit Gateways in the account
// GetAllTransitGateways returns an array of all Transit Gateways in the account
func GetAllTransitGateways(svc *ec2.Client) []TransitGateway {
	var result []TransitGateway
	resp, err := svc.DescribeTransitGateways(context.TODO(), &ec2.DescribeTransitGatewaysInput{})
	if err != nil {
		panic(err)
	}
	for _, tgw := range resp.TransitGateways {
		tgwobject := TransitGateway{
			ID:          *tgw.TransitGatewayId,
			AccountID:   *tgw.OwnerId,
			Name:        getNameFromTags(tgw.Tags),
			RouteTables: GetRouteTablesForTransitGateway(*tgw.TransitGatewayId, svc),
		}
		result = append(result, tgwobject)
	}
	return result
}
func GetAllTransitGateways ( svc * ec2 . Client ) [ ] TransitGateway { var result [ ] TransitGateway resp , err := svc . DescribeTransitGateways ( context . TODO ( ) , & ec2 . DescribeTransitGatewaysInput { } ) if err != nil { panic ( err ) } for _ , tgw := range resp . TransitGateways { tgwobject := TransitGateway { ID : * tgw . TransitGatewayId , AccountID : * tgw . OwnerId , Name : getNameFromTags ( tgw . Tags ) , RouteTables : GetRouteTablesForTransitGateway ( * tgw . TransitGatewayId , svc ) , } result = append ( result , tgwobject ) } return result }
GetAllTransitGateways returns an array of all Transit Gateways in the account
GetAllTransitGateways returns an array of all Transit Gateways in the account