Documentation ¶
Index ¶
- func DetectType(src string) (name string, source string, found bool, err error)
- func Get(ctx context.Context, installPath, url string, options ...getter.ClientOption) error
- func NormalizePath(src string) string
- func ParseSourceSubPolicy(src string) (policySrc string, subdir string)
- type Detector
- type GitHubDetector
- type HubDetector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizePath ¶
func ParseSourceSubPolicy ¶
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.
type HubDetector ¶
type HubDetector struct { }
Click to show internal directories.
Click to hide internal directories.