Documentation
¶
Overview ¶
Package structtag provides struct tag value extraction and cross-validation for Datapages handler parameters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrQueryReflectSignalNotInSignals = errors.New(
"query reflectsignal tag references signal " +
"not in signals parameter",
)
ErrQueryReflectSignalNotInSignals indicates a reflectsignal tag references a signal not present in the signals parameter.
Functions ¶
func JSONTagExcluded ¶ added in v0.2.3
JSONTagExcluded reports whether the struct tag is `json:"-"`, which instructs encoding/json to always omit this field. Note: `json:"-,"` is distinct — it names the field "-" and is NOT treated as excluded.
func JSONTagValue ¶
JSONTagValue extracts the value from a `json:"value"` struct tag, stripping options like ",omitempty".
func PathTagValue ¶
PathTagValue extracts the value from a `path:"value"` struct tag.
func QueryTagValue ¶ added in v0.2.3
QueryTagValue extracts the value from a `query:"value"` struct tag.
func ReflectSignalTagValue ¶
ReflectSignalTagValue extracts the value from a `reflectsignal:"value"` struct tag.
Types ¶
This section is empty.