-
Notifications
You must be signed in to change notification settings - Fork 73
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
NewStruct() reform.Struct #19
Comments
Because |
I think that a particular table or twist must return a specific model, rather than an abstract. This is logical and convenient for the further use of this structure. // foo is Foo, not reform.Struct
foo := FooView.NewStruct()
func useFoo(f Foo) {
} |
It will not work in Go. For example, see https://github.com/AlekSi/reform/blob/master/querier_selects.go#L67 Here we need In you case you need this: var foo Foo That's it, no need to use |
Thanks |
Why
NewStruct
returnreform.Struct
if we have our struct, which implementreform.Struct
?https://github.com/AlekSi/reform/blob/master/reform/template.go#L45
The text was updated successfully, but these errors were encountered: