diff --git a/core/collection/set.go b/core/collection/set.go index 774fa26e..b65e33fb 100644 --- a/core/collection/set.go +++ b/core/collection/set.go @@ -213,23 +213,23 @@ func (s *Set) validate(i any) { switch i.(type) { case int: if s.tp != intType { - logx.Errorf("Error: element is int, but set contains elements with type %d", s.tp) + logx.Errorf("element is int, but set contains elements with type %d", s.tp) } case int64: if s.tp != int64Type { - logx.Errorf("Error: element is int64, but set contains elements with type %d", s.tp) + logx.Errorf("element is int64, but set contains elements with type %d", s.tp) } case uint: if s.tp != uintType { - logx.Errorf("Error: element is uint, but set contains elements with type %d", s.tp) + logx.Errorf("element is uint, but set contains elements with type %d", s.tp) } case uint64: if s.tp != uint64Type { - logx.Errorf("Error: element is uint64, but set contains elements with type %d", s.tp) + logx.Errorf("element is uint64, but set contains elements with type %d", s.tp) } case string: if s.tp != stringType { - logx.Errorf("Error: element is string, but set contains elements with type %d", s.tp) + logx.Errorf("element is string, but set contains elements with type %d", s.tp) } } } diff --git a/core/mapping/unmarshaler.go b/core/mapping/unmarshaler.go index c40e34ae..e4240cf2 100644 --- a/core/mapping/unmarshaler.go +++ b/core/mapping/unmarshaler.go @@ -1009,7 +1009,7 @@ func newInitError(name string) error { } func newTypeMismatchError(name string) error { - return fmt.Errorf("error: type mismatch for field %s", name) + return fmt.Errorf("type mismatch for field %s", name) } func readKeys(key string) []string { diff --git a/core/stores/sqlx/utils.go b/core/stores/sqlx/utils.go index 9e67007b..dae12faf 100644 --- a/core/stores/sqlx/utils.go +++ b/core/stores/sqlx/utils.go @@ -66,7 +66,7 @@ func format(query string, args ...any) (string, error) { switch ch { case '?': if argIndex >= numArgs { - return "", fmt.Errorf("error: %d ? in sql, but less arguments provided", argIndex) + return "", fmt.Errorf("%d ? in sql, but less arguments provided", argIndex) } writeValue(&b, args[argIndex]) @@ -93,7 +93,7 @@ func format(query string, args ...any) (string, error) { index-- if index < 0 || numArgs <= index { - return "", fmt.Errorf("error: wrong index %d in sql", index) + return "", fmt.Errorf("wrong index %d in sql", index) } writeValue(&b, args[index]) @@ -124,7 +124,7 @@ func format(query string, args ...any) (string, error) { } if argIndex < numArgs { - return "", fmt.Errorf("error: %d arguments provided, not matching sql", argIndex) + return "", fmt.Errorf("%d arguments provided, not matching sql", argIndex) } return b.String(), nil diff --git a/tools/goctl/model/sql/test/utils.go b/tools/goctl/model/sql/test/utils.go index 598914ef..d26cceb6 100644 --- a/tools/goctl/model/sql/test/utils.go +++ b/tools/goctl/model/sql/test/utils.go @@ -53,7 +53,7 @@ func format(query string, args ...any) (string, error) { for _, ch := range query { if ch == '?' { if argIndex >= numArgs { - return "", fmt.Errorf("error: %d ? in sql, but less arguments provided", argIndex) + return "", fmt.Errorf("%d ? in sql, but less arguments provided", argIndex) } arg := args[argIndex] @@ -79,7 +79,7 @@ func format(query string, args ...any) (string, error) { } if argIndex < numArgs { - return "", fmt.Errorf("error: %d ? in sql, but more arguments provided", argIndex) + return "", fmt.Errorf("%d ? in sql, but more arguments provided", argIndex) } return b.String(), nil