We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm trying to update the expressions in an if statement, but I'm not sure if this is supported.
if
I have code where the struct A has a bool property and an if statements with multiple expressions:
A
type A struct { Value: bool } a := A{} if test1 && test2 && a.Value { // do the thing }
But Value is now a pointer to a bool, so the if statements should be transformed to
Value
if test1 && test2 && a.Value != nil && *a.Value { // do the thing }
This does not match:
@@ var a identifier @@ -if ... && a.Value +if ... && a.Value != nil && *a.Value
but insteads gives the error
load patch "bool_to_pointer.patch": parse: bool_to_pointer.patch/5.minus.augmented:4:1: expected operand, found '}'
If this is supported, can you point me in the right direction?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm trying to update the expressions in an
if
statement, but I'm not sure if this is supported.I have code where the struct
A
has a bool property and anif
statements with multiple expressions:But
Value
is now a pointer to a bool, so theif
statements should be transformed toThis does not match:
but insteads gives the error
If this is supported, can you point me in the right direction?
The text was updated successfully, but these errors were encountered: