Error map
does not implement interface (missing method) Go: cannot use &Dog{} (value of type *Dog) as Animal value: *Dog does not implement Animal (missing method Speak)
Go · layer 4, Application & API
Centre: this error. First ring: errors it is linked with (12). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.
Directly related (12)
Go: ./main.go:5:2: "os" imported and not used
The file imports a package that no code in that file uses; Go treats this as a compile error, not a warning.
Go: ./main.go:12:2: undefined: handler
The compiler cannot find an identifier — a typo, a missing import, or it lives in another file/package that wasn't built.
Go: ./main.go:18:1: missing return
A function with a return type can reach its end without a return statement on some path.
Go: ./main.go:9:6: no new variables on left side of :=
`:=` declares variables, but all names on the left already exist in the same scope.
Go: cannot assign to struct field users["bob"].Age in map
Map values are not addressable, so you cannot modify a field of a struct stored directly in a map.
Go: invalid operation: a + b (mismatched types int and float64)
You combined two values of different types; Go never converts numeric types implicitly.
Go: cannot use "5" (untyped string constant) as int value in argument to f
A value's type is not assignable to the type required by the variable, parameter or return value.
Go: not enough arguments in call to f have (int) want (int, string)
A function was called with fewer or more arguments than it declares.
Go: runtime.main_main·f: function main is undeclared in the main package
The package is named `main` but contains no `func main()`, or you tried to build a library as an executable.
Go: panic: interface conversion: interface {} is string, not int
A type assertion `x.(T)` failed because the dynamic type of the interface is not T.
Go: assignment mismatch: 1 variable but os.Open returns 2 values
The number of variables on the left does not match the number of values the function returns.
Go: package app/models imports app/utils imports app/models: import cycle not allowed
Two or more packages import each other directly or indirectly, which Go forbids.
Two steps away (19)
Go: declared and not used: x / "fmt" imported and not used
Go refuses to compile code with unused local variables or unused imports.
Go: ./main.go:8:2: syntax error: unexpected newline, expected comma or )
The parser met a line break where it needed more tokens, usually a missing trailing comma in a multi-line literal or a misplaced…
Go: cannot refer to unexported name pkg.helper (undefined: pkg.helper)
You used a lowercase (unexported) identifier from another package; only capitalised names are visible outside their package.
Go: panic: assignment to entry in nil map
You wrote to a map that was declared but never initialised.
Go: fatal error: concurrent map writes
Two goroutines wrote to the same map at the same time; the runtime detects it and aborts the program (not recoverable).
Go: fatal error: concurrent map read and map write
One goroutine read from a map while another wrote to it; the runtime aborts.
Rust: error[E0308]: mismatched types — expected `X`, found `Y`
A value’s type doesn’t match what the context expects — common with &str vs String, Option/Result vs plain values, and integer ty…
Go: sql: no rows in result set
`QueryRow(...).Scan(...)` found no row for the query.
COPY failed: file not found in build context / "/app/x": not found
The Dockerfile COPY refers to a path outside the build context, excluded by .dockerignore, or relative to the wrong directory.
failed to solve: process "/bin/sh -c ..." did not complete successfully: exit code: 1
A RUN step in your Dockerfile failed. The real error is printed in the lines just above this message.
failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory
docker build can’t find a Dockerfile in the build context you passed.
Go: panic: runtime error: invalid memory address or nil pointer dereference
The program used a pointer, map, interface or struct field that was nil — usually an uninitialised value or an ignored error.
Go: panic: runtime error: index out of range [3] with length 3
Code accessed a slice, array or string element beyond its length.
Go: panic: runtime error: slice bounds out of range [:5] with capacity 3
A slice expression `s[a:b]` used bounds outside the slice's length or capacity.
Go: Get "https://api.example.com": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
An operation did not finish before its context deadline or HTTP client timeout.
Go: context canceled (rpc error: code = Canceled desc = context canceled)
The context was cancelled before the operation finished — the caller gave up, the client disconnected, or a parent was cancelled.
Go: json: cannot unmarshal string into Go struct field User.age of type int
The JSON value's type does not match the Go field type (string vs number, object vs array).
Go: cannot find package "github.com/pkg/errors" in any of: /usr/local/go/src/github.com/pkg/errors (from $GOROOT) /go/src/github.com/pkg/errors (from $GOPATH)
Go could not locate an imported package — it is not downloaded, the module is not initialised, or GOPATH mode is in effect.
Go: no required module provides package github.com/foo/bar; to add it: go get github.com/foo/bar
The code imports a package whose module is not listed in `go.mod`.
Map another error
Popular: 500403400ORA-009331064Critical errorFileNotFoundException assemblyTypeError