mirror of
https://github.com/TECHNOFAB11/jsonnet-bundler.git
synced 2025-12-12 08:00:05 +01:00
Improve github slug regex
This commit is contained in:
parent
d8dbcba49c
commit
bd22799e96
1 changed files with 4 additions and 4 deletions
|
|
@ -45,10 +45,10 @@ var (
|
||||||
initSubcommand,
|
initSubcommand,
|
||||||
installSubcommand,
|
installSubcommand,
|
||||||
}
|
}
|
||||||
githubSlugRegex = regexp.MustCompile("github.com/(.*)/(.*)")
|
githubSlugRegex = regexp.MustCompile("github.com/([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)")
|
||||||
githubSlugWithVersionRegex = regexp.MustCompile("github.com/(.*)/(.*)@(.*)")
|
githubSlugWithVersionRegex = regexp.MustCompile("github.com/([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)@(.*)")
|
||||||
githubSlugWithPathRegex = regexp.MustCompile("github.com/(.*)/(.*)/(.*)")
|
githubSlugWithPathRegex = regexp.MustCompile("github.com/([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)/(.*)")
|
||||||
githubSlugWithPathAndVersionRegex = regexp.MustCompile("github.com/(.*)/(.*)/(.*)@(.*)")
|
githubSlugWithPathAndVersionRegex = regexp.MustCompile("github.com/([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)/(.*)@(.*)")
|
||||||
)
|
)
|
||||||
|
|
||||||
type config struct {
|
type config struct {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue