godl

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2020 License: Apache-2.0 Imports: 19 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RootImport added in v0.0.2

func RootImport(importPath string) (string, error)

RootImport returns root path of import. i.e. golang.org/x/net for golang.org/x/net/context

Types

type VCS

type VCS struct {
	Root       string
	ImportPath string
	Type       string
}

VCS represents package vcs root.

func Download

func Download(importPath, repoPath, target, rev string) (*VCS, error)

Download downloads package by its import path. It can be a subpackage, whole repo will be downloaded anyway. if repoPath is not empty string, it will be uses for vcs. target is top directory for download. i.e. if target is vendor/ and importPath is github.com/LK4D4/vndr, package will be downloaded to vendor/github.com/LK4D4/vndr. rev is desired revision of package.

Directories

Path Synopsis
Package singleflight provides a duplicate function call suppression mechanism.
Package singleflight provides a duplicate function call suppression mechanism.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL