1
0
mirror of https://github.com/fumiama/deepinfra.git synced 2026-06-05 00:32:46 +08:00

fix(utils): empty response on absense of sep

This commit is contained in:
源文雨
2025-06-01 20:27:06 +09:00
parent 71ec2f7c08
commit 0175c95164

View File

@@ -12,7 +12,7 @@ func CutLast(txt, sep string) string {
}
a := strings.LastIndex(txt, sep)
if a < 0 {
return ""
return strings.TrimSpace(txt)
}
a += len(sep)
if a >= len(txt) {