excelutils

package
v0.1.28 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: LGPL-2.1 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NewHash = fnv.New64a
)

Functions

func AnyToHash

func AnyToHash(h hash.Hash64, v any) error

func AnyToIndex

func AnyToIndex(v any) (uint64, error)

func BooleanToIndex

func BooleanToIndex(b bool) uint64

func BytesToIndex

func BytesToIndex(bs []byte) (uint64, error)

func DoubleToIndex

func DoubleToIndex(v float64) uint64

func FloatToIndex

func FloatToIndex(v float32) uint64

func IntegerToIndex

func IntegerToIndex[T Integer](v T) uint64

func ListEqual

func ListEqual[T any](a, b []T, fun func(a, b T) bool) bool

func ListToHash

func ListToHash[T any](h hash.Hash64, l []T) error

func ListToIndex

func ListToIndex[T any](l []T) (uint64, error)

func LoadTableFromBinaryData added in v0.1.1

func LoadTableFromBinaryData(tab proto.Message, data []byte) error

func LoadTableFromBinaryFile added in v0.1.1

func LoadTableFromBinaryFile(tab proto.Message, path string) error

func LoadTableFromJsonData added in v0.1.1

func LoadTableFromJsonData(tab proto.Message, data []byte) error

func LoadTableFromJsonFile added in v0.1.1

func LoadTableFromJsonFile(tab proto.Message, path string) error

func MapEqual

func MapEqual[K cmp.Ordered, V any](a, b map[K]V, fun func(a, b V) bool) bool

func MapToHash

func MapToHash[K cmp.Ordered, V any](h hash.Hash64, m map[K]V) error

func MapToIndex

func MapToIndex[K cmp.Ordered, V any](m map[K]V) (uint64, error)

func ProtoMessageFieldNeedHashIndex

func ProtoMessageFieldNeedHashIndex(field protoreflect.FieldDescriptor) bool

func ProtoMessageFieldToIndex

func ProtoMessageFieldToIndex(msg protoreflect.Message, field protoreflect.FieldDescriptor) (uint64, error)

func StringToIndex

func StringToIndex(s string) (uint64, error)

Types

type Integer

type Integer interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr
}

Jump to

Keyboard shortcuts

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