mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-04 15:49:49 +00:00
14 lines
211 B
Go
14 lines
211 B
Go
package util
|
|
|
|
import "strings"
|
|
|
|
const FileSchema = "FILE"
|
|
|
|
func ParseSchema(url string) string {
|
|
index := strings.Index(url, ":")
|
|
if index == -1 {
|
|
return FileSchema
|
|
}
|
|
return strings.ToUpper(url[:index])
|
|
}
|