structset

package
v0.1.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStructFieldNames

func GetStructFieldNames(Struct interface{}) []string

Get all fields in a given struct

func GetStructFieldTagMap

func GetStructFieldTagMap(Struct interface{}, keyTag string, valueTag string) map[string]string

Get a map of tags using keyTag as map key and valueTag as map value

func GetStructFieldTagValues

func GetStructFieldTagValues(Struct interface{}, tag string) []string

Get all tag names in a given struct for a given tag Note: id tag which is auto increment column in DB will not be returned

func GetStructFieldValues

func GetStructFieldValues(Struct interface{}) []interface{}

Get all values in a given struct

func ScanRow

func ScanRow(rows *sql.Rows, dest any) error

ScanRow is a cut-down version of the proposed Rows.ScanRow method. It currently only handles dest being a (pointer to) struct, and does not handle embedded fields. See https://github.com/golang/go/issues/61637

Types

This section is empty.

Jump to

Keyboard shortcuts

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