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

@@ -4,9 +4,9 @@ import (
"errors"
"fmt"
"strconv"
"strings"
gperr "github.com/yusing/goutils/errs"
strutils "github.com/yusing/goutils/strings"
)
type StatusCodeRange struct {
@@ -22,7 +22,7 @@ func (r *StatusCodeRange) Includes(code int) bool {
// Parse implements strutils.Parser.
func (r *StatusCodeRange) Parse(v string) error {
split := strutils.SplitRune(v, '-')
split := strings.Split(v, "-")
switch len(split) {
case 1:
start, err := strconv.Atoi(split[0])