You could use the spread operator on an object of type []build.TransactionMutator that is passed into the build.Transaction method (on `github.com/stellar/go/build`).

Here's a code sample:

    import (
    	“github.com/stellar/go/build"
    )
    
    // BuildWithOps builds a transaction with a dynamic list of operations
    func BuildWithOps(sourceAccount string, seq uint64, network build.Network, ops []build.TransactionMutator) (*build.TransactionBuilder, error) {
    	// build an array of mutators initialized with the essential values
    	muts := []build.TransactionMutator{
    		build.Sequence{Sequence: seq},
    		network,
    		build.SourceAccount{AddressOrSeed: sourceAccount},
    	}
    
    	// dynamically add more mutators/operations as needed
    	muts = append(muts, ops...)
    
    	// build the transaction from these mutators and check for an error
    	tx := build.Transaction(muts...)
    	if tx.Err != nil {
    		return nil, tx.Err
    	}
    	return tx, nil
    }