mercredi 19 octobre 2022

How to access in the code to meta tags from a struct field [duplicate]

I have:

type myStruct struct {
    myField string `json:"my-field" validate:"required"`
}

I have the struct as interface{}, I know how to use the reflect to get the value, and the type. But how can I retrieve the "meta" json and validate??????'





Aucun commentaire:

Enregistrer un commentaire