Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnsupportedPkgPath is returned when a package path is not supported by pkgtwist. ErrUnsupportedPkgPath = errors.New("package path is not supported") // PackageHostGithub represents GitHub as a package host. PackageHostGithub PackageHost = "github.com" // PackageHostGitlab represents GitLab as a package host. PackageHostGitlab PackageHost = "gitlab.com" // GithubPkgPathRegexp matches path for a Go package hosted on GitHub. GithubPkgPathRegexp = regexp.MustCompile(`^github\.com\/[A-Za-z0-9-]{1,39}\/[A-Za-z0-9\._-]{1,100}\/?`) // GitlabPkgPathRegexp matches path for a Go package hosted on GitLab. GitlabPkgPathRegexp = regexp.MustCompile(`^gitlab\.com\/(?:[a-zA-Z0-9\._-]{2,255})\/[a-zA-Z0-9\._-]{2,255}\/?`) )
Functions ¶
This section is empty.
Types ¶
type Package ¶
type Package struct { Path string Owner string Name string Host PackageHost }
Package represents a Go package or module.
type Permutation ¶
type Permutation struct {
Result, Strategy string
}
Permutation represents a string permutated with a specific permutation strategy.
func Permute ¶
func Permute(s string) ([]Permutation, error)
Permute permutates a string with a collection of permutation strategies and returns the results.
Click to show internal directories.
Click to hide internal directories.