small string split join optimization

This commit is contained in:
yusing
2024-12-19 00:54:31 +08:00
parent 654194b274
commit e7be27413c
20 changed files with 160 additions and 50 deletions

View File

@@ -2,8 +2,6 @@ package strutils
import (
"reflect"
"github.com/yusing/go-proxy/internal/logging"
)
type Parser interface {
@@ -22,7 +20,7 @@ func Parse[T Parser](from string) (t T, err error) {
func MustParse[T Parser](from string) T {
t, err := Parse[T](from)
if err != nil {
logging.Panic().Err(err).Msg("must failed")
panic("must failed: " + err.Error())
}
return t
}