refactor: replace custom helper with stdlib strings.*

This commit is contained in:
yusing
2026-02-18 14:26:29 +08:00
parent c2d8cca3b4
commit bb757b2432
9 changed files with 15 additions and 16 deletions

View File

@@ -3,9 +3,9 @@ package route
import (
"errors"
"strconv"
"strings"
gperr "github.com/yusing/goutils/errs"
strutils "github.com/yusing/goutils/strings"
)
type Port struct {
@@ -20,7 +20,7 @@ var (
// Parse implements strutils.Parser.
func (p *Port) Parse(v string) (err error) {
parts := strutils.SplitRune(v, ':')
parts := strings.Split(v, ":")
switch len(parts) {
case 1:
p.Listening = 0