getter

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectType

func DetectType(src string) (string, string, bool, error)

func Get

func Get(ctx context.Context, installPath, url string, options ...getter.ClientOption) error

func NormalizePath

func NormalizePath(src string) string

func ParseSourceSubPolicy

func ParseSourceSubPolicy(src string) (string, string)

ParseSourceSubPolicy takes a source URL and returns a tuple of the URL without the subdir and the subdir.

ex:

dom.com/path/?q=p               => dom.com/path/?q=p, ""
proto://dom.com/path//*?q=p     => proto://dom.com/path?q=p, "*"
proto://dom.com/path//path2?q=p => proto://dom.com/path?q=p, "path2"
dom.com/path@q=p               => dom.com/path/?q=p, ""

Types

type GitHubDetector

type GitHubDetector struct{}

GitHubDetector implements Detector to detect GitHub URLs and turn them into URLs that the Git Getter can understand.

func (*GitHubDetector) Detect

func (d *GitHubDetector) Detect(src, _ string) (string, bool, error)

type HubDetector

type HubDetector struct {
}

func (HubDetector) Detect

func (h HubDetector) Detect(src, _ string) (string, bool, error)

Jump to

Keyboard shortcuts

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