Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to iniitialize data null.String #7

Closed
bondhan opened this issue Oct 7, 2018 · 1 comment
Closed

How to iniitialize data null.String #7

bondhan opened this issue Oct 7, 2018 · 1 comment

Comments

@bondhan
Copy link

bondhan commented Oct 7, 2018

Hi,

I have struct with null.String data type (generated through smallnest/gen), however I got the error

./user_related_unit_test.go:92:82: cannot use "abc" (type string) as type null.String in field value

when I tried to initialize it:

UserCredentialObject := model.UserCredential{UserID: 1, Sequence: 1, AesPwdOld: "abc", AesPwdNew: null, PinBlockOld: "1234", PinBlockNew: "5678"}

@smallnest
Copy link
Owner

should define "abc" as null.String

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants