mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-25 01:38:30 +02:00
refactor: replace custom helper with stdlib strings.*
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
strutils "github.com/yusing/goutils/strings"
|
||||
)
|
||||
@@ -32,7 +33,7 @@ var defaultChunkSize = 32 * kilobyte
|
||||
//
|
||||
// Parse implements strutils.Parser.
|
||||
func (r *Retention) Parse(v string) (err error) {
|
||||
split := strutils.SplitSpace(v)
|
||||
split := strings.Fields(v)
|
||||
if len(split) != 2 {
|
||||
return fmt.Errorf("%w: %s", ErrInvalidSyntax, v)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user