-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
bugSomething isn't workingSomething isn't working
Description
First off, thanks for the package. I've been evaluating it and I think it can work for me, which would save me a ton of time.
I'm running into a few issues, though, and this seems related to #27 since I was able to use the same workaround, but this fails to parse:
// UserProfile represents the user profile
type UserProfile struct {
ID int32 `json:"id"`
Email string `json:"email"`
Name null.Val[string] `json:"name"`
Phone null.Val[string] `json:"phone"`
Avatar null.Val[string] `json:"avatar"`
Roles []rbac.Role `json:"roles"`
Permissions []rbac.Permission `json:"permissions"`
}
But updating it to this, it parses fine:
type roles []rbac.Role
type permissions []rbac.Permission
type nullstring null.Val[string]
// UserProfile represents the user profile
type UserProfile struct {
ID int32 `json:"id"`
Email string `json:"email"`
Name nullstring `json:"name"`
Phone nullstring `json:"phone"`
Avatar nullstring `json:"avatar"`
Roles roles `json:"roles"`
Permissions permissions `json:"permissions"`
}
Unfortunately, refactoring to use typed values like this won't work for me since I have a bunch of generated models.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working