Skip to content

Commit

Permalink
fix: delete mb service failure (#2128)
Browse files Browse the repository at this point in the history
Signed-off-by: 张启航 <[email protected]>
  • Loading branch information
ZhangSetSail authored Jan 13, 2025
1 parent dc73d10 commit f306cd5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/controller/apigateway/api_gateway_route.go
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,11 @@ func removeLeadingDigits(name string) string {
return ""
}

// 如果最后一个部分是 "s",直接返回整个字符串
if parts[len(parts)-1] == "s" {
return name
}

// 移除最后一个部分并重新拼接
return strings.Join(parts[:len(parts)-1], "-")
}

0 comments on commit f306cd5

Please sign in to comment.