chore(optim): Optimizing some piece of code

Simply use modern methods
This commit is contained in:
2025-06-26 23:57:19 +02:00
parent a3d1e9342f
commit a66fec07e1
3 changed files with 8 additions and 11 deletions

View File

@@ -53,8 +53,8 @@ func fixPorts(service *types.ServiceConfig) error {
ports, err := labelStructs.PortsFrom(portsLabel)
if err != nil {
// maybe it's a string, comma separated
parts := strings.Split(portsLabel, ",")
for _, part := range parts {
parts := strings.SplitSeq(portsLabel, ",")
for part := range parts {
part = strings.TrimSpace(part)
if part == "" {
continue