mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-14 20:33:41 +00:00
feat: integration torrent (#30)
This commit is contained in:
1 parent
43378c7dc8
commit
034137322f
20 files changed
+925
-139
No files matched your search
@@ -0,0 +1,13 @@
|
||||
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])
|
||||
}
|
||||
Reference in new issue
Block a user