mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 00:38:33 +02:00
refactor: replace custom helper with stdlib strings.*
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user