Skip to Content
marmot
DiagnosticsError codes
example $ marmot build .
error[M0015]: f redeclared in this block
 --> ./main.go:4:6
  |
3 | func f() {}
  |      - `f` is first declared here
4 | func f() {}
  |      ^

error: build failed with 1 error
for more about an error, run `marmot explain M0015`
The program that produced it
package main

func f() {}
func f() {}

func main() {}

The mistake and the fix

The mistake
func f() {}
func f() {}
Fixed
func f() {}
func g() {} 

The fix

Rename one of the declarations or remove the duplicate.

See also all error codes and marmot explain.

On this page

Was this page helpful?

Report an issueOpen issues