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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user