Skip to Content
marmot
DiagnosticsError codes
example $ marmot build .
error[M0013]: no new variables on left side of :=
 --> ./main.go:5:4
  |
5 |     x := 2
  |       ^^ no new variables on the left
  |
help: use `=` instead of `:=`
  |
5 -     x := 2
5 +     x = 2
  |

error: build failed with 1 error
1 error can be fixed automatically: run `marmot fix`
for more about an error, run `marmot explain M0013`
The program that produced it
package main

func main() {
	x := 1
	x := 2
	_ = x
}

The mistake and the fix

The mistake
x := 1
x := 2
Fixed
x := 1
x = 2

The fix

Use = instead of :=.

See also all error codes and marmot explain.

On this page

Was this page helpful?

Report an issueOpen issues