I have the following route:
m.Post("/users", binding.Bind(models.User{}), func(user models.User, r render.Render)
And I receive the following error message when I try to do a Post
request:
"PANIC: reflect.Value.Interface: cannot return value obtained from unexported field or method"
type User struct {
id int
UUID string `json:"uuid"`
Username string `json:"userName" form:"userName" binding:"required"`
Firstname string `json:"firstName" form:"Firstname" binding:"required`
Lastname string `json:"lastName" form:"Lastname" binding:"required`
Email string `json:"email" form:"Email" binding:"required`
IsActive bool `json:"isActive"`
DateJoined time.Time `json:"dateJoined"`
}
Does anyone have any idea?