MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / SplitStr

Function SplitStr

agent/utils/common/common.go:336–347  ·  view source on GitHub ↗
(str string, spi ...string)

Source from the content-addressed store, hash-verified

334}
335
336func SplitStr(str string, spi ...string) []string {
337 lists := []string{str}
338 var results []string
339 for _, s := range spi {
340 results = []string{}
341 for _, list := range lists {
342 results = append(results, strings.Split(list, s)...)
343 }
344 lists = results
345 }
346 return results
347}
348
349func IsValidIP(ip string) bool {
350 return net.ParseIP(ip) != nil

Callers 1

ComparePanelVersionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected