I have two structures. One own, and the other generated through gRPC. The problem is that when you try to return your own through gRPC, an error is generated: "cannot use list (variable of type []db.User) as *pb.UsersList value in return statement" How can I convert [db.User in *pb.UserList? []User
type User struct{
Username string `json:"username"`
Password string `json:"password"`
}
gRPC UsersList:
type UsersList struct {
state protoiml.MessageState
sizeCache protoiml.SizeCache
unknownFields protoiml.UnknownFields
User []*User `protobuf:"bytes,1,rep,name=user,proto3" json:"user,omitempty
}