reflectx

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FoldName

func FoldName(in []byte) []byte

FoldName returns a folded string such that FoldName(x) == FoldName(y) is identical to bytes.EqualFold(x, y).

func IsEmptyValue

func IsEmptyValue(v reflect.Value) bool

func IsValidTag

func IsValidTag(tag string) bool

IsValidTag returns true if the tag is not empty.

Types

type TagOptions

type TagOptions string

TagOptions ...

func ParseTag

func ParseTag(tag string) (string, TagOptions)

ParseTag splits a struct field's json tag into its name and comma-separated options.

func (TagOptions) Contains

func (o TagOptions) Contains(optionName string) bool

Contains reports whether a comma-separated list of options contains a particular substr flag. substr must be surrounded by a string boundary or commas.

Jump to

Keyboard shortcuts

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