reflectutil

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindFieldByJSONTag

func FindFieldByJSONTag(t reflect.Type, tags []string) reflect.Type

FindFieldByJSONTag is used to find field by full json tag recursively and return the field

func FindJSONFullTagByChildTag

func FindJSONFullTagByChildTag(t reflect.Type, tag string) string

FindJSONFullTagByChildTag is used to find field by child json tag recursively and return the full tag of field. If we have both "a.c" and "b.c" config items, for a given c, it's hard for us to decide which config item it represents. We'd better to naming a config item without duplication.

func FindSameFieldByJSON

func FindSameFieldByJSON(v interface{}, m map[string]interface{}) bool

FindSameFieldByJSON is used to check whether there is same field between `m` and `v`

Types

This section is empty.

Jump to

Keyboard shortcuts

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