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/devspace/vendor/github.com/loft-sh/utils/pkg/downloader
    
    the code of the file until where you have to start completion: package downloader

import (
	"context"
	"io"
	"net/http"
	"os"
	"path/filepath"

	"github.com/loft-sh/utils/pkg/downloader/commands"
	"github.com/loft-sh/utils/pkg/log"

	"github.com/pkg/errors"
)

type Downloader interface {
	EnsureCommand(ctx context.Context) (string, error)
}

type downloader struct {
	httpGet        getRequest
	comm
    
func (d *downloader) downloadExecutable(command, installPath, installFromURL string) error {
	err := os.MkdirAll(filepath.Dir(installPath), 0755)
	if err != nil {
		return err
	}

	err = d.downloadFile(command, installPath, installFromURL)
	if err != nil {
		return errors.Wrap(err, "download file")
	}

	err = os.Chmod(installPath, 0755)
	if err != nil {
		return errors.Wrap(err, "cannot make file executable")
	}

	return nil
}