Documentation
¶
Index ¶
- Constants
- Variables
- func AppendToMap(gmap map[string]interface{}, mp map[string]string)
- func CompareStringSlices(newItems, existingItems []string) (toAdd, toRemove []string)
- func ConfigAs[T any](mapping map[string]any, key string) T
- func Contains[K comparable, V any](mp map[K]V, keys ...K) bool
- func ContainsString(s []string, v string) bool
- func ConvertLotus123SerialToTime(lotus123Serial float64, precision time.Duration) time.Time
- func ConvertTimeToGoLayout(format string) string
- func ConvertToBoolean(input string) bool
- func ConvertToStringMap(inputs map[string]interface{}) (map[string]string, error)
- func CronIntervalValidator(val interface{}, _ string) error
- func FromEnumProto(typeProto, enumName string) string
- func GetFirstNonEmpty[T comparable](opts ...T) T
- func GetMyersDiff(src, dst []string, maxNeighbouringLines int) string
- func IsExtendedNumber(input string) bool
- func IsNumber(input string) bool
- func IsPathOccupied(path string) (bool, error)
- func IsTerminal(f *os.File) bool
- func ListToMap(inputList []string) map[string]struct{}
- func MapToList[V any](inputMap map[string]V) []V
- func MergeAnyMaps(maps ...map[string]interface{}) map[string]interface{}
- func MergeMaps(maps ...map[string]string) map[string]string
- func ToEnumProto(modelType, enumName string) string
- func ValidateCronInterval(val interface{}) error
- func WriteStringToFileIndexed() func(filePath, data string, writer io.Writer) error
- type AttributePath
- type CmpOptions
- type Diff
- type VFactory
Constants ¶
const ( ADD operation = "add" SUB operation = "sub" EQ operation = "eq" )
Variables ¶
var ValidatorFactory = new(VFactory)
Functions ¶
func AppendToMap ¶
func CompareStringSlices ¶ added in v0.19.0
CompareStringSlices compares two string slices, each guaranteed to be unique and returns the items added to newItems & removed from existingItems
func Contains ¶
func Contains[K comparable, V any](mp map[K]V, keys ...K) bool
func ContainsString ¶
ContainsString returns true if a string is present in string slice
func ConvertLotus123SerialToTime ¶ added in v0.19.0
func ConvertTimeToGoLayout ¶ added in v0.19.0
func ConvertToBoolean ¶ added in v0.19.0
func ConvertToStringMap ¶
func CronIntervalValidator ¶
CronIntervalValidator return a nil value when a valid cron string is passed used in gopkg.in/validator.v2
func FromEnumProto ¶
FromEnumProto converts models to Types defined in protobuf, TYPE_TASK -> task
func GetFirstNonEmpty ¶ added in v0.20.7
func GetFirstNonEmpty[T comparable](opts ...T) T
func GetMyersDiff ¶ added in v0.13.0
func IsExtendedNumber ¶ added in v0.19.0
IsExtendedNumber match numbers having ','
func IsPathOccupied ¶
IsPathOccupied checks whether the targeted path is already occupied
func IsTerminal ¶
IsTerminal checks if file descriptor is terminal or not
func MergeAnyMaps ¶
func MergeMaps ¶
MergeMaps can merge values from multiple maps into one It can also create clone of a map
func ToEnumProto ¶
ToEnumProto converts models to Types defined in protobuf, task -> TYPE_TASK
func ValidateCronInterval ¶
func ValidateCronInterval(val interface{}) error
ValidateCronInterval return a nil value when a valid cron string is passed
Types ¶
type AttributePath ¶ added in v0.13.0
type AttributePath string
func (AttributePath) Add ¶ added in v0.13.0
func (a AttributePath) Add(propName string) AttributePath
func (AttributePath) String ¶ added in v0.13.0
func (a AttributePath) String() string
type CmpOptions ¶ added in v0.13.0
type CmpOptions struct {
IgnoreOrderList bool
}