1 Star 0 Fork 0

东海苍月/traefik

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
string_util.go 567 Bytes
一键复制 编辑 原始数据 按行查看 历史
package provider
import "strings"
// SplitAndTrimString splits separatedString at the comma character and trims each
// piece, filtering out empty pieces. Returns the list of pieces or nil if the input
// did not contain a non-empty piece.
func SplitAndTrimString(separatedString string) []string {
listOfStrings := strings.Split(separatedString, ",")
var trimmedListOfStrings []string
for _, s := range listOfStrings {
s = strings.TrimSpace(s)
if len(s) > 0 {
trimmedListOfStrings = append(trimmedListOfStrings, s)
}
}
return trimmedListOfStrings
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dhcy/traefik.git
git@gitee.com:dhcy/traefik.git
dhcy
traefik
traefik
v1.4.1

搜索帮助

D67c1975 1850385 1daf7b77 1850385