Files
athens/pkg/module/ref.go
Rohan Chakravarthy bbe1ce1873 zip.Close() also clears the GOPATH of the underlying diskRef (#367)
* zip.Close() also clears underlying diskRef

* remove unnecessary constructor

* use GoBinPath() in example
2018-07-31 12:38:45 -04:00

14 lines
362 B
Go

package module
import (
"github.com/gomods/athens/pkg/storage"
)
// Ref points to a module somewhere
type Ref interface {
// Read reads the module into memory and returns it. Notice that the Zip field on the returned
// storage.Version is an io.ReadCloser, so make sure to call Close on it after you're done
// with it.
Read() (*storage.Version, error)
}