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: generate_street_address.go
    path of file: ./repos/neosync/worker/internal/benthos/transformers
    
    the code of the file until where you have to start completion: package transformers

import (
	"fmt"
	"math/rand"

	"github.com/benthosdev/benthos/v4/public/bloblang"
	transformers_dataset "github.com/nucleuscloud/neosync/worker/internal/benthos/transformers/data-sets"
	transformer_utils "github.com/nucleuscloud/neosync/worker/internal/benthos/transformers/utils"
)

    
func GenerateRandomStreetAddress(maxLength int64) (string, error) {
	addresses := transformers_dataset.Addresses
	var filteredAddresses []string

	for _, address := range addresses {
		if len(address.Address1) <= int(maxLength) {
			filteredAddresses = append(filteredAddresses, address.Address1)
		}
	}

	if len(filteredAddresses) == 0 {
		if maxLength > 3 {
			hn, err := transformer_utils.GenerateRandomInt64InValueRange(1, 20)
			if err != nil {
				return "", err
			}

			street, err := transformer_utils.GenerateRandomStringWithDefinedLength(maxLength - 3)
			if err != nil {
				return "", err
			}

			return fmt.Sprintf("%d %s", hn, street), nil
		} else {
			street, err := transformer_utils.GenerateRandomStringWithDefinedLength(maxLength)
			if err != nil {
				return "", err
			}

			return street, nil
		}
	}

	// -1 because addresses is an array so we don't overflow
	//nolint:all
	randomIndex := rand.Intn(len(filteredAddresses) - 1)

	return filteredAddresses[randomIndex], nil
}