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: future.go
    path of file: ./repos/ko/pkg/build
    
    the code of the file until where you have to start completion: // Copyright 2018 ko Build Authors All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the Licens
    
func (f *future) Get() (Result, error) {
	// Block on the promise of a result until we get one.
	result, ok := <-f.promise
	if ok {
		func() {
			f.m.Lock()
			defer f.m.Unlock()
			// If we got the result, then store it so that
			// others may access it.
			f.result = result
			// Close the promise channel so that others
			// are signaled that the result is available.
			close(f.promise)
		}()
	}

	f.m.RLock()
	defer f.m.RUnlock()

	return f.result.img, f.result.err
}