common definitions collections
This commit is contained in:
parent
dc6975e56c
commit
92e862da19
11
common-params.go
Normal file
11
common-params.go
Normal 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
common-type-names.go
Normal file
13
common-type-names.go
Normal 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"
|
||||||
|
)
|
@ -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)
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user