gitcache

package
v0.0.0-...-f6bd42f Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NS2URL

func NS2URL(ns string) (string, bool)

func NormalizeURL

func NormalizeURL(url string) (string, bool)

NormalizeURL parses a URL in accordance with the "GIT URLS" section of git-fetch(1), and normalizes it.

func URL2NS

func URL2NS(url string) (string, bool)

Types

type Cache

type Cache struct {
	Dir       string
	MinPeriod time.Duration
	// contains filtered or unexported fields
}

func (*Cache) Clone

func (cache *Cache) Clone(stderr io.Writer, url, dir string, flags ...string) error

func (*Cache) Fetch

func (cache *Cache) Fetch(stderr io.Writer, url string) error

func (*Cache) Maintenance

func (cache *Cache) Maintenance(stderr io.Writer, flags ...string) error

func (*Cache) RevParse

func (cache *Cache) RevParse(stderr io.Writer, url string, revs ...string) (ret []string, err error)

func (*Cache) WithFastClone

func (cache *Cache) WithFastClone(stderr io.Writer, url string, fn func(dir string) error) (err error)

Jump to

Keyboard shortcuts

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