helpers

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2023 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FNVHash added in v1.1.9

func FNVHash(s string) uint32

func FNVHashString added in v1.1.9

func FNVHashString(s string) string

func GetColor added in v1.3.0

func GetColor[T any](colors []T, index int, def T) (T, int)
var ct = 0
for i, value := range opts.Values {
	var color string
	color, ct = getColor(opts.Colors, ct, "#5555ff")

Get the color for a given chart index.

func GetValue

func GetValue(s any, column string) any

Get a value from a model struct

func InlineLoopFields

func InlineLoopFields(reflModel reflect.Type, callback func(field reflect.StructField, parent reflect.Type, value reflect.Value), tags ...string)

func ReflectModelName

func ReflectModelName(s any) string

func SplitWords added in v1.3.2

func SplitWords(s string) []string

Split words by spaces and tabs.

func StructKind

func StructKind(s any) reflect.Type

Get the kind of the model (Reflect.TYPE)

func ValueToString

func ValueToString(v reflect.Value) string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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