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: downloader.go
    path of file: ./repos/pythonbrew/installer
    
    the code of the file until where you have to start completion: package installer

import (
	"crypto/md5"
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
	"path/filepath"

	"github.com/pkg/errors"
	"github.com/utahta/pythonbrew/log"
)

type (
	// Downloader fetches a file given url
	Download
    
func (d *downloader) copy(dst io.Writer, src io.Reader, log func(int64)) error {
	const limit = 32 * 1024
	var written int64
	for {
		nw, err := io.CopyN(dst, src, limit)
		if nw > 0 {
			written += nw
			log(written)
		}

		if err != nil {
			if err != io.EOF {
				return errors.WithStack(err)
			}
			break
		}
	}
	return nil
}