mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-01 01:41:21 -05:00
Bumps [github.com/gookit/config/v2](https://github.com/gookit/config) from 2.2.4 to 2.2.5. - [Release notes](https://github.com/gookit/config/releases) - [Commits](https://github.com/gookit/config/compare/v2.2.4...v2.2.5) --- updated-dependencies: - dependency-name: github.com/gookit/config/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
26 lines
656 B
Go
26 lines
656 B
Go
// Package comdef provide some common type or constant definitions
|
|
package comdef
|
|
|
|
type (
|
|
// MarshalFunc define
|
|
MarshalFunc func(v any) ([]byte, error)
|
|
|
|
// UnmarshalFunc define
|
|
UnmarshalFunc func(bts []byte, ptr any) error
|
|
)
|
|
|
|
// ToTypeFunc convert value to defined type
|
|
type ToTypeFunc[T any] func(any) (T, error)
|
|
|
|
// IntCheckFunc check func
|
|
type IntCheckFunc func(val int) error
|
|
|
|
// StrCheckFunc check func
|
|
type StrCheckFunc func(val string) error
|
|
|
|
// ToStringFunc try to convert value to string, return error on fail
|
|
type ToStringFunc func(v any) (string, error)
|
|
|
|
// SafeStringFunc safe convert value to string
|
|
type SafeStringFunc func(v any) string
|