generic

package
v1.0.0-beta.26 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 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 interface{}, 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 interface{}, field string, compare func(interface{}, interface{}) 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