godl

package
v0.0.0-...-87603e4 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RootImport

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