common definitions collections

This commit is contained in:
2024-05-01 07:10:11 +02:00
parent dc6975e56c
commit 92e862da19
3 changed files with 24 additions and 17 deletions
+11
View File
@@ -0,0 +1,11 @@
// Copyright (c) 2024 Celestino Amoroso (celestino.amoroso@gmail.com).
// All rights reserved.
// common-params.go
package expr
const (
paramParts = "parts"
paramSeparator = "separator"
paramSource = "source"
)
+13
View File
@@ -0,0 +1,13 @@
// Copyright (c) 2024 Celestino Amoroso (celestino.amoroso@gmail.com).
// All rights reserved.
// common-type-names.go
package expr
const (
typeBoolean = "boolean"
typeFloat = "decimal"
typeInt = "integer"
typeNumber = "number"
typeString = "string"
)
-17
View File
@@ -1,17 +0,0 @@
// Copyright (c) 2024 Celestino Amoroso (celestino.amoroso@gmail.com).
// All rights reserved.
// func-common.go
package expr
import (
"fmt"
)
func errOneParam(funcName string) error {
return fmt.Errorf("%s() requires exactly one param", funcName)
}
func errCantConvert(funcName string, value any, kind string) error {
return fmt.Errorf("%s() can't convert %T to %s", funcName, value, kind)
}