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: util.go
    path of file: ./repos/sliver/vendor/github.com/kbinani/screenshot/internal/util
    
    the code of the file until where you have to start completion: package util

import (
	"errors"
	"image"
)

func CreateImage(rect image.Rectangle) (img *image.RGBA, e error) {
	img = nil
    
func CreateImage(rect image.Rectangle) (img *image.RGBA, e error) {
	img = nil
	e = errors.New("Cannot create image.RGBA")

	defer func() {
		err := recover()
		if err == nil {
			e = nil
		}
	}()
	// image.NewRGBA may panic if rect is too large.
	img = image.NewRGBA(rect)

	return img, e
}