I have hard time to understand what is the diffrence between:
var requestPayLoad struct {
Email string `json:"email"`
Password string `json:"string"`
}
and:
type jwtUSer struct {
ID int `json:"id"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
}
one is type and one is a var.
var v Tcreates a variable, binds the identifiervto it, gives it the typeT, and then initializes it to the zero-value ofT.type t Tbinds the identifiertto typeT.In both cases type
Tmay be a named or an unnamed (anonymous) type.