helpers

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 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

func FNVHash(s string) uint32

func FNVHashString

func FNVHashString(s string) string

func GetColor

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

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)

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