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: loader.go
    path of file: ./repos/cloud-game/pkg/worker/caged/libretro/nanoarch
    
    the code of the file until where you have to start completion: package nanoarch

import (
	"errors"
	"os"
	"path"
	"strconv"
	"strings"
	"unsafe"
)

/*
#cgo LDFLAGS: -ldl
#include <stdlib.h>
#include <dlfcn.h>
*/
import "C"

func loadF
    
func loadLibRollingRollingRolling(filepath string) (handle unsafe.Pointer, err error) {
	dir, lib := path.Dir(filepath), path.Base(filepath)
	files, err := os.ReadDir(dir)
	if err != nil {
		return nil, errors.New("couldn't find 'n load the lib")
	}

	for _, file := range files {
		if !file.IsDir() && strings.HasPrefix(file.Name(), lib) {
			handle = open(path.Join(dir, file.Name()))
			if handle != nil {
				return handle, nil
			}
		}
	}
	return nil, errors.New("couldn't find 'n load the lib")
}