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: nosync.go
    path of file: ./repos/coraza/internal/memoize
    
    the code of the file until where you have to start completion: // Copyright 2023 Juan Pablo Tosso and the OWASP Coraza contributors
// SPDX-License-Identifier: Apache-2.0

//go:build tinygo && memoize_builders

package memoize

import "sync"

var doer = makeDoer(new(sync.Map))

// Do executes and returns the results of the given function, unless
    
func makeDoer(cache *sync.Map) func(string, func() (interface{}, error)) (interface{}, error, bool) {
	return func(key string, fn func() (interface{}, error)) (interface{}, error, bool) {
		// Check cache
		value, found := cache.Load(key)
		if found {
			return value, nil, true
		}

		data, err := fn()
		if err == nil {
			cache.Store(key, data)
		}

		return data, err, false
	}
}