Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CacheDir = os.Getenv("HOME") + "/.anyvendor/git"
set to override cache dir
View Source
var ProgressOut = os.Stdout
set to override progress logging
Functions ¶
This section is empty.
Types ¶
type GitRepository ¶
type GitRepository struct { // The repo URL URL string // provide one of SHA or Tag SHA string Tag string // HTTP Auth User (for private repository) AuthUser string // HTTP Auth Token (for private repository) AuthToken string // match files with these patterns in the repo MatchPatterns []string // skip these dirs when vendoring files SkipDirs []string }
vendor files from a git repository
func (*GitRepository) Vendor ¶
func (r *GitRepository) Vendor(cache *GitVendorCache, vendorDir string) error
type GitVendorCache ¶
type GitVendorCache struct {
Dir string
}
GitVendorCache maintains a local cache of vendored git repos
func DefaultCache ¶
func DefaultCache() *GitVendorCache
func (*GitVendorCache) EnsureCheckedOut ¶
func (c *GitVendorCache) EnsureCheckedOut( url, sha, tag, authUser, authToken string, ) error
func (*GitVendorCache) GetRepoDir ¶
func (c *GitVendorCache) GetRepoDir(url string) (string, string)
func (*GitVendorCache) Init ¶
func (c *GitVendorCache) Init() error
type VendorOptions ¶
type VendorOptions struct {
GitRepositories []GitRepository
}
vendor files from git repositories
func (VendorOptions) Vendor ¶
func (r VendorOptions) Vendor(cache *GitVendorCache, vendorDir string) error
Click to show internal directories.
Click to hide internal directories.