Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Downloader ¶
Downloader fetches repositories under the given source tree. Not thread-safe.
func NewDownloader ¶
func NewDownloader(srcRoot string) *Downloader
func (*Downloader) DestinationPath ¶
func (d *Downloader) DestinationPath(pkg string) string
Determines where the repository will be downloaded before we download it.
func (*Downloader) Download ¶
func (d *Downloader) Download(pkg string) (string, error)
Download runs the create or download command to make the first copy of or update a copy of the given package.
func (*Downloader) HeadRef ¶
func (d *Downloader) HeadRef(pkg string) (string, error)
Determines the hash of the currently checked out head.
Returns the empty string if the current VCS does not support HEAD references.
func (*Downloader) RefSync ¶
func (d *Downloader) RefSync(pkg, tag string) error
Update the checked out repo to the given ref. Assumes the repo has already been downloaded.
type ImportPathError ¶
ImportPathError is a type of error that prevents a package from being loaded for a given import path. When such a package is loaded, a *Package is returned with Err wrapping an ImportPathError: the error is attached to the imported package, not the importing package.
The string returned by ImportPath must appear in the string returned by Error. Errors that wrap ImportPathError (such as PackageError) may omit the import path.
func ImportErrorf ¶
func ImportErrorf(path, format string, args ...interface{}) ImportPathError
Directories
¶
Path | Synopsis |
---|---|
internal
|
|
auth
Package auth provides access to user-provided authentication credentials.
|
Package auth provides access to user-provided authentication credentials. |
web
Package web defines minimal helper routines for accessing HTTP/HTTPS resources without requiring external dependenicies on the net package.
|
Package web defines minimal helper routines for accessing HTTP/HTTPS resources without requiring external dependenicies on the net package. |