isc

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2022 License: Apache-2.0 Imports: 13 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ArrayBlanks = "- "

ArrayBlanks 数组缩进

View Source
var Dot = "."

Dot 点

View Source
var IndentBlanks = "  "

IndentBlanks 缩进空格

View Source
var NewLine = "\n"

NewLine 换行符

View Source
var SignEqual = "="

SignEqual 等号连接符

View Source
var SignSemicolon = ":"

SignSemicolon 分号连接符

View Source
var YamlNewLineDom = "|\n"

NewLineDom yaml的value换行符

Functions

func ArrayToObject

func ArrayToObject(dataArray interface{}, targetPtrObj interface{}) error
func Banner(filePath string)

func Base64Decode

func Base64Decode(dst string) ([]byte, error)

func Base64Encode

func Base64Encode(src []byte) string

func Cast

func Cast(fieldKind reflect.Kind, valueStr string) (any, error)

func DataToObject

func DataToObject(data any, targetPtrObj any) error

DataToObject 其他的类型能够按照小写字母转换到对象 其他类型:

  • 基本类型
  • 结构体类型:转换后对象
  • map类型
  • 集合/分片类型
  • 字符串类型:如果是json,则按照json进行转换

func DefaultBanner

func DefaultBanner()

func Drop added in v0.0.5

func Drop[T any](list []T, n int) []T

func DropLast added in v0.0.5

func DropLast[T any](list []T, n int) []T

func DropLastWhile added in v0.0.5

func DropLastWhile[T any](list []T, n int, f func(T) bool) []T

func DropWhile added in v0.0.5

func DropWhile[T any](list []T, n int, f func(T) bool) []T

func Find added in v0.0.5

func Find[T any](list []T, f func(T) bool) *T

func FindLast added in v0.0.5

func FindLast[T any](list []T, f func(T) bool) *T

func First added in v0.0.5

func First[T any](list []T) T

func FirstOrNull added in v0.0.5

func FirstOrNull[T any](list []T) *T

func GetPropertiesItemLineList

func GetPropertiesItemLineList(content string) []string

func GroupBy

func GroupBy[T any, K comparable](list []T, f func(T) K) map[K][]T

func GroupByTo

func GroupByTo[T any, K comparable](list []T, dest *map[K][]T, f func(T) K) map[K][]T

func GroupByTransform

func GroupByTransform[T any, K comparable, V any](list []T, f func(T) K, trans func(T) V) map[K][]V

func GroupByTransformTo

func GroupByTransformTo[T any, K comparable, V any](list []T, dest *map[K][]V, f func(T) K, trans func(T) V) map[K][]V

func IndexOf

func IndexOf[T comparable](list []T, item T) int

func IndexOfCondition

func IndexOfCondition[T comparable](list []T, f func(T) bool) int

func IsBaseType

func IsBaseType(fieldType reflect.Type) bool

IsBaseType 是否是常见基本类型

func IsJson

func IsJson(content string) bool

func IsNumber

func IsNumber(fieldKing reflect.Kind) bool

func IsPrivate

func IsPrivate(s string) bool

func IsProperty

func IsProperty(content string) bool

func IsPublic

func IsPublic(s string) bool

func IsYaml

func IsYaml(content string) bool

func JsonToMap

func JsonToMap(contentOfJson string) (map[string]interface{}, error)

func JsonToYaml

func JsonToYaml(contentOfJson string) (string, error)

func KvToProperties

func KvToProperties(key, value string, valueType TypeEnum) (string, error)

func Last added in v0.0.5

func Last[T any](list []T) T

func LastIndexOf

func LastIndexOf[T comparable](list []T, item T) int

func LastIndexOfCondition

func LastIndexOfCondition[T comparable](list []T, f func(T) bool) int

func LastOrNull added in v0.0.5

func LastOrNull[T any](list []T) *T

func ListAll

func ListAll[T any](list []T, f func(T) bool) bool

func ListAny

func ListAny[T any](list []T, f func(T) bool) bool

func ListContains

func ListContains[T comparable](list []T, item T) bool

func ListCount

func ListCount[T any](list []T, f func(T) bool) int

func ListFilter added in v0.0.5

func ListFilter[T any](list []T, f func(T) bool) []T

func ListFilterIndexed added in v0.0.5

func ListFilterIndexed[T any](list []T, f func(int, T) bool) []T

func ListFilterIndexedTo added in v0.0.5

func ListFilterIndexedTo[T any](list []T, dest *[]T, f func(int, T) bool) []T

func ListFilterNot added in v0.0.5

func ListFilterNot[T any](list []T, f func(T) bool) []T

func ListFilterNotIndexed added in v0.0.5

func ListFilterNotIndexed[T any](list []T, f func(int, T) bool) []T

func ListFilterNotIndexedTo added in v0.0.5

func ListFilterNotIndexedTo[T any](list []T, dest *[]T, f func(int, T) bool) []T

func ListFilterNotNull added in v0.0.5

func ListFilterNotNull[T any](list []*T) []*T

func ListFilterNotTo added in v0.0.5

func ListFilterNotTo[T any](list []T, dest *[]T, f func(T) bool) []T

func ListFilterTo added in v0.0.5

func ListFilterTo[T any](list []T, dest *[]T, f func(T) bool) []T

func ListFlatMap added in v0.0.5

func ListFlatMap[T any, R any](list []T, f func(T) []R) []R

func ListFlatMapIndexed added in v0.0.5

func ListFlatMapIndexed[T any, R any](list []T, f func(int, T) []R) []R

func ListFlatMapIndexedTo added in v0.0.5

func ListFlatMapIndexedTo[T any, R any](list []T, dest *[]R, f func(int, T) []R) []R

func ListFlatMapTo added in v0.0.5

func ListFlatMapTo[T any, R any](list []T, dest *[]R, f func(T) []R) []R

func ListFlattern added in v0.0.5

func ListFlattern[T any](list [][]T) []T

func ListJoinToString added in v0.0.5

func ListJoinToString[T any](list []T, f func(T) string) string

func ListJoinToStringFull added in v0.0.5

func ListJoinToStringFull[T any](list []T, sep string, prefix string, postfix string, f func(T) string) string

func ListMap added in v0.0.5

func ListMap[T any, R any](list []T, f func(T) R) []R

func ListMapIndexed added in v0.0.5

func ListMapIndexed[T any, R any](list []T, f func(int, T) R) []R

func ListMapIndexedNotNull added in v0.0.5

func ListMapIndexedNotNull[T any, R any](list []*T, f func(int, T) R) []R

func ListMapIndexedNotNullTo added in v0.0.5

func ListMapIndexedNotNullTo[T any, R any](list []*T, dest *[]R, f func(int, T) R) []R

func ListMapIndexedTo added in v0.0.5

func ListMapIndexedTo[T any, R any](list []T, dest *[]R, f func(int, T) R) []R

func ListMapNotNull added in v0.0.5

func ListMapNotNull[T any, R any](list []*T, f func(T) R) []R

func ListMapNotNullTo added in v0.0.5

func ListMapNotNullTo[T any, R any](list []*T, dest *[]R, f func(T) R) []R

func ListMapTo added in v0.0.5

func ListMapTo[T any, R any](list []T, dest *[]R, f func(T) R) []R

func ListNone

func ListNone[T any](list []T, f func(T) bool) bool

func ListToMap added in v0.0.5

func ListToMap[K comparable, V any](list []Pair[K, V]) map[K]V

func MapAll

func MapAll[K comparable, V any](m map[K]V, f func(K, V) bool) bool

func MapAllKey

func MapAllKey[K comparable, V any](m map[K]V, f func(K) bool) bool

func MapAllValue

func MapAllValue[K comparable, V any](m map[K]V, f func(V) bool) bool

func MapAny

func MapAny[K comparable, V any](m map[K]V, f func(K, V) bool) bool

func MapAnyKey

func MapAnyKey[K comparable, V any](m map[K]V, f func(K) bool) bool

func MapAnyValue

func MapAnyValue[K comparable, V any](m map[K]V, f func(V) bool) bool

func MapContains

func MapContains[K comparable, V comparable](m map[K]V, k K, v V) bool

func MapContainsKey

func MapContainsKey[K comparable, V any](m map[K]V, k K) bool

func MapContainsValue

func MapContainsValue[K comparable, V comparable](m map[K]V, v V) bool

func MapCount

func MapCount[K comparable, V any](m map[K]V, f func(K, V) bool) int

func MapCountKey

func MapCountKey[K comparable, V any](m map[K]V, f func(K) bool) int

func MapCountValue

func MapCountValue[K comparable, V any](m map[K]V, f func(V) bool) int

func MapFilter

func MapFilter[K comparable, V any](m map[K]V, f func(K, V) bool) map[K]V

func MapFilterKeys

func MapFilterKeys[K comparable, V any](m map[K]V, f func(K) bool) map[K]V

func MapFilterNot

func MapFilterNot[K comparable, V any](m map[K]V, f func(K, V) bool) map[K]V

func MapFilterNotTo

func MapFilterNotTo[K comparable, V any](m map[K]V, dest *map[K]V, f func(K, V) bool) map[K]V

func MapFilterTo

func MapFilterTo[K comparable, V any](m map[K]V, dest *map[K]V, f func(K, V) bool) map[K]V

func MapFilterValues

func MapFilterValues[K comparable, V any](m map[K]V, f func(V) bool) map[K]V

func MapFlatMap added in v0.0.5

func MapFlatMap[K comparable, V any, R any](m map[K]V, f func(K, V) []R) []R

func MapFlatMapTo added in v0.0.5

func MapFlatMapTo[K comparable, V any, R any](m map[K]V, dest *[]R, f func(K, V) []R) []R

func MapJoinToString added in v0.0.5

func MapJoinToString[K comparable, V any](m map[K]V, f func(K, V) string) string

func MapJoinToStringFull added in v0.0.5

func MapJoinToStringFull[K comparable, V any](m map[K]V, sep string, prefix string, postfix string, f func(K, V) string) string

func MapMap added in v0.0.5

func MapMap[K comparable, V any, R any](m map[K]V, f func(K, V) R) []R

func MapMapNotNull added in v0.0.5

func MapMapNotNull[K comparable, V any, R any](m map[K]*V, f func(K, V) R) []R

func MapMapNotNullTo added in v0.0.5

func MapMapNotNullTo[K comparable, V any, R any](m map[K]*V, dest *[]R, f func(K, V) R) []R

func MapMapTo added in v0.0.5

func MapMapTo[K comparable, V any, R any](m map[K]V, dest *[]R, f func(K, V) R) []R

func MapNone

func MapNone[K comparable, V any](m map[K]V, f func(K, V) bool) bool

func MapNoneKey

func MapNoneKey[K comparable, V any](m map[K]V, f func(K) bool) bool

func MapNoneValue

func MapNoneValue[K comparable, V any](m map[K]V, f func(V) bool) bool

func MapToObject

func MapToObject(dataMap interface{}, targetPtrObj interface{}) error

func MapToProperties

func MapToProperties(dataMap map[string]interface{}) (string, error)

进行深层嵌套的map数据处理

func ObjectToData

func ObjectToData(object interface{}) interface{}

ObjectToData 字段转化,其中对应字段为小写,map的话为小写

func ObjectToJson

func ObjectToJson(object interface{}) string

ObjectToJson 对象转化为json,其中map对应的key为小写

func ObjectToYaml

func ObjectToYaml(value interface{}) (string, error)

func PropertiesEntityToYaml

func PropertiesEntityToYaml(properties Properties) (string, error)

func PropertiesToMap

func PropertiesToMap(contentOfProperties string) (map[string]interface{}, error)

func PropertiesToYaml

func PropertiesToYaml(contentOfProperties string) (string, error)

func ReaderToObject

func ReaderToObject(reader io.Reader, targetPtrObj interface{}) error

func Reduce added in v0.0.5

func Reduce[S any, T any](list []T, init func(T) S, f func(S, T) S) S

func ReduceIndexed added in v0.0.5

func ReduceIndexed[S any, T any](list []T, init func(int, T) S, f func(int, S, T) S) S

func Slice added in v0.0.5

func Slice[T any](list []T, r IntRange) []T

func SliceBy added in v0.0.5

func SliceBy[T comparable](list []T, r []int) []T

func StrToObject

func StrToObject(contentOfJson string, targetPtrObj interface{}) error

func SubList added in v0.0.5

func SubList[T any](list []T, fromIndex int, toIndex int) []T

func Take added in v0.0.5

func Take[T any](list []T, n int) []T

func TakeLast added in v0.0.5

func TakeLast[T any](list []T, n int) []T

func TakeLastWhile added in v0.0.5

func TakeLastWhile[T any](list []T, n int, f func(T) bool) []T

func TakeWhile added in v0.0.5

func TakeWhile[T any](list []T, n int, f func(T) bool) []T

func ToBool

func ToBool(value any) bool

func ToComplex128

func ToComplex128(value any) complex128

func ToComplex64

func ToComplex64(value any) complex64

func ToFloat32

func ToFloat32(value any) float32

func ToFloat64

func ToFloat64(value any) float64

func ToInt

func ToInt(value any) int

func ToInt16

func ToInt16(value any) int16

func ToInt32

func ToInt32(value any) int32

func ToInt64

func ToInt64(value any) int64

func ToInt8

func ToInt8(value any) int8

func ToJsonString

func ToJsonString(value any) string

func ToLowerFirstPrefix

func ToLowerFirstPrefix(dataStr string) string

ToLowerFirstPrefix 首字母小写

func ToMap

func ToMap(data any) map[string]any

func ToString

func ToString(value any) string

func ToUInt

func ToUInt(value any) uint

func ToUInt16

func ToUInt16(value any) uint16

func ToUInt32

func ToUInt32(value any) uint32

func ToUInt64

func ToUInt64(value any) uint64

func ToUInt8

func ToUInt8(value any) uint8

func ToUpperFirstPrefix

func ToUpperFirstPrefix(dataStr string) string

ToUpperFirstPrefix 首字母大写

func ToValue

func ToValue(value any, valueKind reflect.Kind) (any, error)

func YamlCheck

func YamlCheck(content string) error

func YamlToJson

func YamlToJson(contentOfYaml string) (string, error)

func YamlToList

func YamlToList(contentOfYaml string) ([]interface{}, error)

func YamlToMap

func YamlToMap(contentOfYaml string) (map[string]interface{}, error)

func YamlToProperties

func YamlToProperties(contentOfYaml string) (string, error)

func YamlToPropertiesWithKey

func YamlToPropertiesWithKey(key string, contentOfYaml string) (string, error)

Types

type ChangeError

type ChangeError struct {
	ErrMsg string
}

func (*ChangeError) Error

func (error *ChangeError) Error() string

type ConvertError

type ConvertError struct {
	// contains filtered or unexported fields
}

func (*ConvertError) Error

func (convertError *ConvertError) Error() string

type ISCList

type ISCList[T comparable] struct {
	// contains filtered or unexported fields
}

func NewList

func NewList[T comparable](list []T) ISCList[T]

func NewListWithItems added in v0.0.5

func NewListWithItems[T comparable](items ...T) ISCList[T]

func (ISCList[T]) All added in v0.0.5

func (l ISCList[T]) All(f func(T) bool) bool

func (ISCList[T]) Any added in v0.0.5

func (l ISCList[T]) Any(f func(T) bool) bool

func (ISCList[T]) Contains added in v0.0.5

func (l ISCList[T]) Contains(item T) bool

func (ISCList[T]) Count added in v0.0.5

func (l ISCList[T]) Count(f func(T) bool) int

func (ISCList[T]) Drop added in v0.0.5

func (l ISCList[T]) Drop(n int) ISCList[T]

func (ISCList[T]) DropLast added in v0.0.5

func (l ISCList[T]) DropLast(n int) ISCList[T]

func (ISCList[T]) DropLastWhile added in v0.0.5

func (l ISCList[T]) DropLastWhile(n int, f func(T) bool) ISCList[T]

func (ISCList[T]) DropWhile added in v0.0.5

func (l ISCList[T]) DropWhile(n int, f func(T) bool) ISCList[T]

func (ISCList[T]) Filter added in v0.0.5

func (l ISCList[T]) Filter(f func(T) bool) ISCList[T]

func (ISCList[T]) FilterIndexed added in v0.0.5

func (l ISCList[T]) FilterIndexed(f func(int, T) bool) ISCList[T]

func (ISCList[T]) FilterIndexedTo added in v0.0.5

func (l ISCList[T]) FilterIndexedTo(dest *[]T, f func(int, T) bool) ISCList[T]

func (ISCList[T]) FilterNot added in v0.0.5

func (l ISCList[T]) FilterNot(f func(T) bool) ISCList[T]

func (ISCList[T]) FilterNotIndexed added in v0.0.5

func (l ISCList[T]) FilterNotIndexed(f func(int, T) bool) ISCList[T]

func (ISCList[T]) FilterNotIndexedTo added in v0.0.5

func (l ISCList[T]) FilterNotIndexedTo(dest *[]T, f func(int, T) bool) ISCList[T]

func (ISCList[T]) FilterNotTo added in v0.0.5

func (l ISCList[T]) FilterNotTo(dest *[]T, f func(T) bool) ISCList[T]

func (ISCList[T]) FilterTo added in v0.0.5

func (l ISCList[T]) FilterTo(dest *[]T, f func(T) bool) ISCList[T]

func (ISCList[T]) Find added in v0.0.5

func (l ISCList[T]) Find(f func(T) bool) *T

func (ISCList[T]) FindLast added in v0.0.5

func (l ISCList[T]) FindLast(f func(T) bool) *T

func (ISCList[T]) First added in v0.0.5

func (l ISCList[T]) First() T

func (ISCList[T]) FirstOrNull added in v0.0.5

func (l ISCList[T]) FirstOrNull() *T

func (ISCList[T]) IndexOf added in v0.0.5

func (l ISCList[T]) IndexOf(item T) int

func (ISCList[T]) IndexOfCondition added in v0.0.5

func (l ISCList[T]) IndexOfCondition(f func(T) bool) int

func (ISCList[T]) IsEmpty added in v0.0.5

func (l ISCList[T]) IsEmpty() bool

func (ISCList[T]) JoinToString added in v0.0.5

func (l ISCList[T]) JoinToString(f func(T) string) string

func (ISCList[T]) JoinToStringFull added in v0.0.5

func (l ISCList[T]) JoinToStringFull(sep string, prefix string, postfix string, f func(T) string) string

func (ISCList[T]) Last added in v0.0.5

func (l ISCList[T]) Last() T

func (ISCList[T]) LastIndexOf added in v0.0.5

func (l ISCList[T]) LastIndexOf(item T) int

func (ISCList[T]) LastIndexOfCondition added in v0.0.5

func (l ISCList[T]) LastIndexOfCondition(f func(T) bool) int

func (ISCList[T]) LastOrNull added in v0.0.5

func (l ISCList[T]) LastOrNull() *T

func (ISCList[T]) None added in v0.0.5

func (l ISCList[T]) None(f func(T) bool) bool

func (ISCList[T]) Slice added in v0.0.5

func (l ISCList[T]) Slice(r IntRange) ISCList[T]

func (ISCList[T]) SliceBy added in v0.0.5

func (l ISCList[T]) SliceBy(r []int) ISCList[T]

func (ISCList[T]) SubList added in v0.0.5

func (l ISCList[T]) SubList(fromIndex int, toIndex int) ISCList[T]

func (ISCList[T]) Take added in v0.0.5

func (l ISCList[T]) Take(n int) ISCList[T]

func (ISCList[T]) TakeLast added in v0.0.5

func (l ISCList[T]) TakeLast(n int) ISCList[T]

func (ISCList[T]) TakeLastWhile added in v0.0.5

func (l ISCList[T]) TakeLastWhile(n int, f func(T) bool) ISCList[T]

func (ISCList[T]) TakeWhile added in v0.0.5

func (l ISCList[T]) TakeWhile(n int, f func(T) bool) ISCList[T]

func (ISCList[T]) ToArray added in v0.0.5

func (l ISCList[T]) ToArray() []T

type ISCListToGroup added in v0.0.5

type ISCListToGroup[T comparable, K comparable, V comparable] struct {
	// contains filtered or unexported fields
}

func ListToGroupFrom added in v0.0.5

func ListToGroupFrom[T comparable, K comparable, V comparable](list ISCList[T]) ISCListToGroup[T, K, V]

func (ISCListToGroup[T, K, V]) GroupBy added in v0.0.5

func (l ISCListToGroup[T, K, V]) GroupBy(f func(T) K) map[K][]T

func (ISCListToGroup[T, K, V]) GroupByTo added in v0.0.5

func (l ISCListToGroup[T, K, V]) GroupByTo(dest *map[K][]T, f func(T) K) map[K][]T

func (ISCListToGroup[T, K, V]) GroupByTransform added in v0.0.5

func (l ISCListToGroup[T, K, V]) GroupByTransform(f func(T) K, trans func(T) V) map[K][]V

func (ISCListToGroup[T, K, V]) GroupByTransformTo added in v0.0.5

func (l ISCListToGroup[T, K, V]) GroupByTransformTo(dest *map[K][]V, f func(T) K, trans func(T) V) map[K][]V

type ISCListToMap added in v0.0.5

type ISCListToMap[T comparable, R comparable] struct {
	// contains filtered or unexported fields
}

func ListToMapFrom added in v0.0.5

func ListToMapFrom[T comparable, R comparable](list ISCList[T]) ISCListToMap[T, R]

func (ISCListToMap[T, R]) FlatMap added in v0.0.5

func (l ISCListToMap[T, R]) FlatMap(f func(T) []R) ISCList[R]

func (ISCListToMap[T, R]) FlatMapIndexed added in v0.0.5

func (l ISCListToMap[T, R]) FlatMapIndexed(f func(int, T) []R) ISCList[R]

func (ISCListToMap[T, R]) FlatMapIndexedTo added in v0.0.5

func (l ISCListToMap[T, R]) FlatMapIndexedTo(dest *[]R, f func(int, T) []R) ISCList[R]

func (ISCListToMap[T, R]) FlatMapTo added in v0.0.5

func (l ISCListToMap[T, R]) FlatMapTo(dest *[]R, f func(T) []R) ISCList[R]

func (ISCListToMap[T, R]) Map added in v0.0.5

func (l ISCListToMap[T, R]) Map(f func(T) R) ISCList[R]

func (ISCListToMap[T, R]) MapIndexed added in v0.0.5

func (l ISCListToMap[T, R]) MapIndexed(f func(int, T) R) ISCList[R]

func (ISCListToMap[T, R]) MapIndexedTo added in v0.0.5

func (l ISCListToMap[T, R]) MapIndexedTo(dest *[]R, f func(int, T) R) ISCList[R]

func (ISCListToMap[T, R]) MapTo added in v0.0.5

func (l ISCListToMap[T, R]) MapTo(dest *[]R, f func(T) R) ISCList[R]

func (ISCListToMap[T, R]) Reduce added in v0.0.5

func (l ISCListToMap[T, R]) Reduce(init func(T) R, f func(R, T) R) R

func (ISCListToMap[T, R]) ReduceIndexed added in v0.0.5

func (l ISCListToMap[T, R]) ReduceIndexed(init func(int, T) R, f func(int, R, T) R) R

type ISCListToPair added in v0.0.5

type ISCListToPair[K comparable, V comparable] struct {
	// contains filtered or unexported fields
}

func ListToPairFrom added in v0.0.5

func ListToPairFrom[K comparable, V comparable](list ISCList[Pair[K, V]]) ISCListToPair[K, V]

func ListToPairWithPairs added in v0.0.5

func ListToPairWithPairs[K comparable, V comparable](list ...Pair[K, V]) ISCListToPair[K, V]

func (ISCListToPair[K, V]) ToMap added in v0.0.5

func (l ISCListToPair[K, V]) ToMap() ISCMap[K, V]

type ISCMap

type ISCMap[K comparable, V comparable] struct {
	// contains filtered or unexported fields
}

func NewMap added in v0.0.5

func NewMap[K comparable, V comparable](ma map[K]V) ISCMap[K, V]

func NewMapWithPairs added in v0.0.5

func NewMapWithPairs[K comparable, V comparable](pairs ...Pair[K, V]) ISCMap[K, V]

func (ISCMap[K, V]) All added in v0.0.5

func (m ISCMap[K, V]) All(f func(K, V) bool) bool

func (ISCMap[K, V]) AllKey added in v0.0.5

func (m ISCMap[K, V]) AllKey(f func(K) bool) bool

func (ISCMap[K, V]) AllValue added in v0.0.5

func (m ISCMap[K, V]) AllValue(f func(V) bool) bool

func (ISCMap[K, V]) Any added in v0.0.5

func (m ISCMap[K, V]) Any(f func(K, V) bool) bool

func (ISCMap[K, V]) AnyKey added in v0.0.5

func (m ISCMap[K, V]) AnyKey(f func(K) bool) bool

func (ISCMap[K, V]) AnyValue added in v0.0.5

func (m ISCMap[K, V]) AnyValue(f func(V) bool) bool

func (ISCMap[K, V]) Contains added in v0.0.5

func (m ISCMap[K, V]) Contains(k K, v V) bool

func (ISCMap[K, V]) ContainsKey added in v0.0.5

func (m ISCMap[K, V]) ContainsKey(k K) bool

func (ISCMap[K, V]) ContainsValue added in v0.0.5

func (m ISCMap[K, V]) ContainsValue(v V) bool

func (ISCMap[K, V]) Count added in v0.0.5

func (m ISCMap[K, V]) Count(f func(K, V) bool) int

func (ISCMap[K, V]) CountKey added in v0.0.5

func (m ISCMap[K, V]) CountKey(f func(K) bool) int

func (ISCMap[K, V]) CountValue added in v0.0.5

func (m ISCMap[K, V]) CountValue(f func(V) bool) int

func (ISCMap[K, V]) Filter added in v0.0.5

func (m ISCMap[K, V]) Filter(f func(K, V) bool) ISCMap[K, V]

func (ISCMap[K, V]) FilterKeys added in v0.0.5

func (m ISCMap[K, V]) FilterKeys(f func(K) bool) ISCMap[K, V]

func (ISCMap[K, V]) FilterNot added in v0.0.5

func (m ISCMap[K, V]) FilterNot(f func(K, V) bool) ISCMap[K, V]

func (ISCMap[K, V]) FilterNotTo added in v0.0.5

func (m ISCMap[K, V]) FilterNotTo(dest *map[K]V, f func(K, V) bool) ISCMap[K, V]

func (ISCMap[K, V]) FilterTo added in v0.0.5

func (m ISCMap[K, V]) FilterTo(dest *map[K]V, f func(K, V) bool) ISCMap[K, V]

func (ISCMap[K, V]) FilterValues added in v0.0.5

func (m ISCMap[K, V]) FilterValues(f func(V) bool) ISCMap[K, V]

func (ISCMap[K, V]) JoinToString added in v0.0.5

func (m ISCMap[K, V]) JoinToString(f func(K, V) string) string

func (ISCMap[K, V]) JoinToStringFull added in v0.0.5

func (m ISCMap[K, V]) JoinToStringFull(sep string, prefix string, postfix string, f func(K, V) string) string

func (ISCMap[K, V]) None added in v0.0.5

func (m ISCMap[K, V]) None(f func(K, V) bool) bool

func (ISCMap[K, V]) NoneKey added in v0.0.5

func (m ISCMap[K, V]) NoneKey(f func(K) bool) bool

func (ISCMap[K, V]) NoneValue added in v0.0.5

func (m ISCMap[K, V]) NoneValue(f func(V) bool) bool

func (ISCMap[K, V]) ToList added in v0.0.5

func (m ISCMap[K, V]) ToList() []Pair[K, V]

func (ISCMap[K, V]) ToMap added in v0.0.5

func (m ISCMap[K, V]) ToMap() map[K]V

type ISCMapToMap added in v0.0.5

type ISCMapToMap[K comparable, V comparable, R comparable] struct {
	// contains filtered or unexported fields
}

func MapToMapFrom added in v0.0.5

func MapToMapFrom[K comparable, V comparable, R comparable](m ISCMap[K, V]) ISCMapToMap[K, V, R]

func (ISCMapToMap[K, V, R]) FlatMap added in v0.0.5

func (m ISCMapToMap[K, V, R]) FlatMap(f func(K, V) []R) ISCList[R]

func (ISCMapToMap[K, V, R]) FlatMapTo added in v0.0.5

func (m ISCMapToMap[K, V, R]) FlatMapTo(dest *[]R, f func(K, V) []R) ISCList[R]

func (ISCMapToMap[K, V, R]) Map added in v0.0.5

func (m ISCMapToMap[K, V, R]) Map(f func(K, V) R) ISCList[R]

func (ISCMapToMap[K, V, R]) MapTo added in v0.0.5

func (m ISCMapToMap[K, V, R]) MapTo(dest *[]R, f func(K, V) R) ISCList[R]

type IntRange

type IntRange struct {
	Start int
	End   int
}

func MakeIntRange

func MakeIntRange(AStart int, AEnd int) IntRange

type Pair added in v0.0.5

type Pair[A any, B any] struct {
	First  A
	Second B
}

func MapToList added in v0.0.5

func MapToList[K comparable, V any](m map[K]V) []Pair[K, V]

func NewPair added in v0.0.5

func NewPair[A any, B any](a A, b B) Pair[A, B]

type Properties

type Properties struct {
	Value map[string]string
}

type StringPair

type StringPair struct {
	Left  string
	Right string
}

func YamlToKvList

func YamlToKvList(contentOfYaml string) ([]StringPair, error)

type Triple added in v0.0.5

type Triple[A any, B any, C any] struct {
	First  A
	Second B
	Third  C
}

func NewTriple added in v0.0.5

func NewTriple[A any, B any, C any](a A, b B, c C) Triple[A, B, C]

type TypeEnum

type TypeEnum int8
const (
	YAML       TypeEnum = 0
	PROPERTIES TypeEnum = 1
	JSON       TypeEnum = 2
	STRING     TypeEnum = 3
)

type YamlNode

type YamlNode struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL