fix: cliutil: Fix URL-based API endpoint parsing
This commit is contained in:
parent
cf56f246b9
commit
8577272164
@ -43,13 +43,7 @@ func ParseApiInfoMulti(s string) []APIInfo {
|
|||||||
allAddrs := strings.SplitN(s, ",", -1)
|
allAddrs := strings.SplitN(s, ",", -1)
|
||||||
|
|
||||||
for _, addr := range allAddrs {
|
for _, addr := range allAddrs {
|
||||||
if infoWithToken.Match([]byte(addr)) {
|
apiInfos = append(apiInfos, ParseApiInfo(addr))
|
||||||
sp := strings.SplitN(addr, ":", 2)
|
|
||||||
apiInfos = append(apiInfos, APIInfo{
|
|
||||||
Addr: sp[1],
|
|
||||||
Token: []byte(sp[0]),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return apiInfos
|
return apiInfos
|
||||||
|
Loading…
Reference in New Issue
Block a user