You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>goagen bootstrap -d goatest/design
exit status 1
goatest\app\contexts.go:44:14: expected operand, found '%!'(MISSING)
goatest\app\contexts.go:47:3: expected ';', found 'if'
[...]
if len(paramNum) == 0 {
rctx.Num = %!!(MISSING)f(int=50)
} else {
%f should maybe be %v. Sending 50.0 as default value works around the issue.
The text was updated successfully, but these errors were encountered:
klauspost
changed the title
Providing integer Default value gives compilation error
Providing integer Default for Number gives compilation error
Aug 8, 2017
This is actually a different issue, the type is declared as Number and not Integer so the runtime value is a float64 but 50 is an int value. Using 50.0 is the correct thing to do. That being said the data types in the DSL are modeled after JSON - not after the Go type system. So it would probably be good if one could use 50 to specific a Number value. I'll take this as a enhancement request :)
Probably a regression caused by fixing integer numbers:
%f
should maybe be%v
. Sending50.0
as default value works around the issue.The text was updated successfully, but these errors were encountered: