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: testutils.go
    path of file: ./repos/gokrazy/integration/integrationtest
    
    the code of the file until where you have to start completion: package integrationtest

import (
	"bytes"
	"embed"
	"fmt"
	"io"
	"io/fs"
	"io/ioutil"
	"log"
	"os"
	"os/exec"
	"path/filepath"
	"strconv"
	"testing"
	"time"

	"github.com/anatol/vmtest"
)

//go:embed boot.go
va
    
func copyFile(dest string, src fs.DirEntry) error {
	out, err := os.Create(dest)
	if err != nil {
		return err
	}
	defer out.Close()

	in, err := mainFiles.ReadFile(src.Name())
	if err != nil {
		return err
	}

	if _, err := io.Copy(out, bytes.NewReader(in)); err != nil {
		return err
	}

	st, err := src.Info()
	if err != nil {
		return err
	}
	if err := out.Chmod(st.Mode()); err != nil {
		return err
	}
	return out.Close()
}