generic

package
v1.0.0-beta.35 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasField

func HasField(i any, fieldName string) bool

HasField returns true if given struct has a field with given name Also allow a slice, it will use the underlying type

func SortSliceByField

func SortSliceByField(list any, field string, compare func(any, any) bool)

SortSliceByField sorts given slice of struct by passing the specified field to given compare function given slice must be a slice of Ptr

Types

This section is empty.

Jump to

Keyboard shortcuts

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