I was working in Google CLoud and all was fine.. but when I clone all my project in my PC, I have this messages in every JSON struct.
struct field tag bson:"edad" json:"edad, omitempty"
not compatible with reflect.StructTag.Get: suspicious space in struct tag valuestructtag
This is my Struct
type Usuario struct {
ID bson.RawValue `bson:"_id" json:"id, omitempty"`
Nombre string `bson:"nombre" json:"nombre, omitempty"`
Apellidos string `bson:"apellidos" json:"apellidos, omitempty"`
Edad int `bson:"edad" json:"edad, omitempty"`
Email string `bson:"email" json:"email"`
Password string `bson:"password" json:"password, omitempty"`
}
What's wrong ?
Thanks
struct field tag bson:"edad" json:"edad, omitempty" not compatible with reflect.StructTag.Get: suspicious space in struct tag valuestructtag
this is warning not error. you should still be able to run your project.
this error coused by space
"bson:"password" json:"password, omitempty"
"
"bson:"password" json:"password,omitempty"
(should be like this)
no space after comma. then it will work perfect.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With