mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
* zip.Close() also clears underlying diskRef * remove unnecessary constructor * use GoBinPath() in example
14 lines
362 B
Go
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)
|
|
}
|