mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-02 01:48:30 +02:00
Add Makefile / .drone.yml, use go module with vendor (#20)
* add Makefile / .drone.yml, use go module with vendor * Update .drone.yml Co-Authored-By: lunny <xiaolunwen@gmail.com>
This commit is contained in:
@ -10,9 +10,11 @@ var (
|
||||
protocolRe = regexp.MustCompile("^[a-zA-Z_+-]+://")
|
||||
)
|
||||
|
||||
// URLParser represents a git URL parser
|
||||
type URLParser struct {
|
||||
}
|
||||
|
||||
// Parse parses the git URL
|
||||
func (p *URLParser) Parse(rawURL string) (u *url.URL, err error) {
|
||||
if !protocolRe.MatchString(rawURL) &&
|
||||
strings.Contains(rawURL, ":") &&
|
||||
@ -37,6 +39,7 @@ func (p *URLParser) Parse(rawURL string) (u *url.URL, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// ParseURL parses URL string and return URL struct
|
||||
func ParseURL(rawURL string) (u *url.URL, err error) {
|
||||
p := &URLParser{}
|
||||
return p.Parse(rawURL)
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
package setting
|
||||
|
||||
// App related variables
|
||||
var (
|
||||
AppVer string
|
||||
AppBuiltWith string
|
||||
|
Reference in New Issue
Block a user