E2008 Parse Errors

invalid-assignment-target

cannot assign to this expression

When this occurs

Assignment to non-assignable (not identifier, index, or member)

Example error message

error[E2008]: invalid assignment target: cannot assign to *ast.IntegerValue

How to fix

You can only assign to variables, array elements, or struct fields. Check the left side of your assignment.

Related errors