mirror of
https://github.com/HChaZZY/alist.git
synced 2025-12-15 22:56:27 +08:00
21 lines
389 B
Go
21 lines
389 B
Go
package test
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestSplit(t *testing.T) {
|
|
drive_id := "/123/456"
|
|
strs := strings.Split(drive_id, "/")
|
|
fmt.Println(strs)
|
|
}
|
|
|
|
func TestPassword(t *testing.T) {
|
|
fullName:="hello.password-xhf"
|
|
index:=strings.Index(fullName,".password-")
|
|
name:=fullName[:index]
|
|
password:=fullName[index+10:]
|
|
fmt.Printf("name:%s, password:%s\n",name,password)
|
|
} |