mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 08:11:11 +08:00
25w30c
This commit is contained in:
parent
558d3fbb0b
commit
d79aeaaacd
10 changed files with 214 additions and 215 deletions
|
|
@ -27,6 +27,10 @@ var (
|
|||
Code: 403,
|
||||
Msg: "AuthHeader Unavailable",
|
||||
}
|
||||
ErrNotFound = &MatcherErrors{
|
||||
Code: 404,
|
||||
Msg: "Not Found",
|
||||
}
|
||||
)
|
||||
|
||||
func (e *MatcherErrors) Error() string {
|
||||
|
|
@ -122,7 +126,7 @@ func Matcher(rawPath string, cfg *config.Config) (string, string, string, error)
|
|||
}
|
||||
return user, repo, matcher, nil
|
||||
}
|
||||
return "", "", "", ErrInvalidURL
|
||||
return "", "", "", ErrNotFound
|
||||
}
|
||||
|
||||
func EditorMatcher(rawPath string, cfg *config.Config) (bool, string, error) {
|
||||
|
|
@ -165,12 +169,6 @@ func EditorMatcher(rawPath string, cfg *config.Config) (bool, string, error) {
|
|||
|
||||
// 匹配文件扩展名是sh的rawPath
|
||||
func MatcherShell(rawPath string) bool {
|
||||
/*
|
||||
if strings.HasSuffix(rawPath, ".sh") {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
*/
|
||||
return strings.HasSuffix(rawPath, ".sh")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue