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
error obfuscating go-openapi/spec: cannot use make as value in assignment #690
Comments
Can you share some code so we can reproduce? |
main.go
docs/docs.go
|
The code in question is: We appear to not obfuscate the anonymous struct type in the I think it makes sense to look at this once @lu4p's #644 is merged. It's entirely possible that his new detection logic already handles this case properly, in which case we should just add a regression test that failed with the old detection. |
would #644 merge in next release? |
We want to merge it soon, yes. |
This appears to still happen in master after the latest changes; cc @lu4p. |
What version of Garble and Go are you using?
What environment are you running Garble on?
go env
OutputWhat did you do?
What did you expect to see?
garble build done
What did you see instead?
github.com/go-openapi/spec
:1: cannot use make([]map[string]struct{PkQkPm []string; Zw3sMnzI4_l bool}, 0, len(chPWgF2S.Security)) (value of type []map[string]struct{PkQkPm []string; Zw3sMnzI4_l bool}) as []map[string]struct{List []string; Pad bool} value in assignment
:1: cannot use jB3BcU6B3 (variable of type map[string]struct{PkQkPm []string; Zw3sMnzI4_l bool}) as map[string]struct{List []string; Pad bool} value in argument to append
:1: cannot use make([]map[string]struct{PkQkPm []string; Zw3sMnzI4_l bool}, 0, len(lBSSbmm.Security)) (value of type []map[string]struct{PkQkPm []string; Zw3sMnzI4_l bool}) as []map[string]struct{List []string; Pad bool} value in assignment
:1: cannot use jB3BcU6B3 (variable of type map[string]struct{PkQkPm []string; Zw3sMnzI4_l bool}) as map[string]struct{List []string; Pad bool} value in argument to append
exit status 2
exit status 1
The text was updated successfully, but these errors were encountered: