Error map

import cycle not allowed Go: package app/models imports app/utils imports app/models: import cycle not allowed

Go · layer 4, Application & API

Open the full error page →

Centre: this error. First ring: errors it is linked with (10). 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.

import cycle not allowed — Go: package app/models imports app/utils imports app/models: import cycle not allowed (Go)import cycl…undefined: x — Go: ./main.go:12:2: undefined: handler (Go)undefined: xcannot assign to struct field m[k].f in map — Go: cannot assign to struct field users["bob"].Age in map (Go)cannot assign to st…invalid operation: mismatched types — Go: invalid operation: a + b (mismatched types int and float64) (Go)invalid operation: …cannot use x as type in assignment/argument — Go: cannot use "5" (untyped string constant) as int value in argument to f (Go)cannot use x as typ…not enough / too many arguments in call — Go: not enough arguments in call to f have (int) want (int, string) (Go)not enough / too ma…cannot find package in any of GOROOT / GOPATH — 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)cannot find package…cannot refer to unexported name — Go: cannot refer to unexported name pkg.helper (undefined: pkg.helper) (Go)cannot refer to une…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)does not implement …no required module provides package — Go: no required module provides package github.com/foo/bar; to add it: go get github.com/foo/bar (Go)no required module …assignment mismatch: 1 variable but f returns 2 values — Go: assignment mismatch: 1 variable but os.Open returns 2 values (Go)assignment mismatch…imported and not used — Go: ./main.go:5:2: "os" imported and not used (Go)imported and not us…no new variables on left side of := — Go: ./main.go:9:6: no new variables on left side of := (Go)no new variables on…function main is undeclared in the main package — Go: runtime.main_main·f: function main is undeclared in the main package (Go)function main is un…missing return — Go: ./main.go:18:1: missing return (Go)missing returnsyntax error: unexpected newline — Go: ./main.go:8:2: syntax error: unexpected newline, expected comma or ) (Go)syntax error: unexp…panic: assignment to entry in nil map — Go: panic: assignment to entry in nil map (Go)panic: assignment t…E0308 — Rust: error[E0308]: mismatched types — expected `X`, found `Y` (Rust)E0308E0412: cannot find type in this scope — Rust: error[E0412]: cannot find type `User` in this scope (Rust)E0412: cannot find …E0271: type mismatch resolving associated type — Rust: error[E0271]: type mismatch resolving `<impl Iterator as Iterator>::Item == i32` (Rust)E0271: type mismatc…sql: no rows in result set — Go: sql: no rows in result set (Go)sql: no rows in res…E0061: this function takes N arguments but M were supplied — Rust: error[E0061]: this function takes 2 arguments but 1 argument was supplied (Rust)E0061: this functio…listen tcp :8080: bind: address already in use — Go: listen tcp :8080: bind: address already in use (Go)listen tcp :8080: b…x509: certificate signed by unknown authority — Go: x509: certificate signed by unknown authority (Go)x509: certificate s…too many open files — Go: accept tcp [::]:8080: accept4: too many open files / open x: too many open files (Go)too many open filesjson: cannot unmarshal string into Go struct field — Go: json: cannot unmarshal string into Go struct field User.age of type int (Go)json: cannot unmars…panic: interface conversion — Go: panic: interface conversion: interface {} is string, not int (Go)panic: interface co…go: updates to go.mod needed — Go: go: updates to go.mod needed; to update it: go mod tidy (Go)go: updates to go.m…missing go.sum entry — Go: missing go.sum entry for module providing package github.com/pkg/errors (imported by app); to add: go get app (Go)missing go.sum entryinvalid version: unknown revision — Go: go: github.com/foo/bar@v1.2.3: invalid version: unknown revision v1.2.3 (Go)invalid version: un…context deadline exceeded — Go: Get "https://api.example.com": context deadline exceeded (Client.Timeout exceeded while awaiting headers) (Go)context deadline ex…context canceled — Go: context canceled (rpc error: code = Canceled desc = context canceled) (Go)context canceledinvalid character looking for beginning of value — Go: invalid character '<' looking for beginning of value (Go)invalid character l…

Directly related (10)

undefined: xGo

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.

cannot assign to struct field m[k].f in mapGo

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.

invalid operation: mismatched typesGo

Go: invalid operation: a + b (mismatched types int and float64)

You combined two values of different types; Go never converts numeric types implicitly.

cannot use x as type in assignment/argumentGo

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.

not enough / too many arguments in callGo

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.

cannot find package in any of GOROOT / GOPATHGo

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.

cannot refer to unexported nameGo

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.

does not implement interface (missing method)Go

Go: cannot use &Dog{} (value of type *Dog) as Animal value: *Dog does not implement Animal (missing method Speak)

A type was used as an interface but lacks a method or has it with a different signature or receiver type.

no required module provides packageGo

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`.

assignment mismatch: 1 variable but f returns 2 valuesGo

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.

Two steps away (22)

imported and not usedGo

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.

no new variables on left side of :=Go

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.

function main is undeclared in the main packageGo

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.

missing returnGo

Go: ./main.go:18:1: missing return

A function with a return type can reach its end without a return statement on some path.

syntax error: unexpected newlineGo

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…

panic: assignment to entry in nil mapGo

Go: panic: assignment to entry in nil map

You wrote to a map that was declared but never initialised.

E0308Rust

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…

E0412: cannot find type in this scopeRust

Rust: error[E0412]: cannot find type `User` in this scope

A type name isn't defined or imported in the current module.

E0271: type mismatch resolving associated typeRust

Rust: error[E0271]: type mismatch resolving `<impl Iterator as Iterator>::Item == i32`

A trait's associated type (Iterator::Item, Future::Output) doesn't match what's expected.

sql: no rows in result setGo

Go: sql: no rows in result set

`QueryRow(...).Scan(...)` found no row for the query.

E0061: this function takes N arguments but M were suppliedRust

Rust: error[E0061]: this function takes 2 arguments but 1 argument was supplied

A call has too few or too many arguments for the function signature.

listen tcp :8080: bind: address already in useGo

Go: listen tcp :8080: bind: address already in use

The port your Go server wants is already taken by another process (or a previous instance of your app).

x509: certificate signed by unknown authorityGo

Go: x509: certificate signed by unknown authority

The Go TLS client does not trust the CA that signed the server's certificate.

too many open filesGo

Go: accept tcp [::]:8080: accept4: too many open files / open x: too many open files

The process reached its file-descriptor limit — usually leaked connections, files or response bodies.

json: cannot unmarshal string into Go struct fieldGo

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).

panic: interface conversionGo

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: updates to go.mod neededGo

Go: go: updates to go.mod needed; to update it: go mod tidy

`go.mod` is out of sync with the imports in your code, and Go is running with `-mod=readonly` (the default).

missing go.sum entryGo

Go: missing go.sum entry for module providing package github.com/pkg/errors (imported by app); to add: go get app

`go.sum` lacks the checksum for a dependency that your build needs.

invalid version: unknown revisionGo

Go: go: github.com/foo/bar@v1.2.3: invalid version: unknown revision v1.2.3

Go cannot fetch the requested module version — the tag or branch doesn't exist, the repository is private or the proxy hasn't see…

context deadline exceededGo

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.

context canceledGo

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.

invalid character looking for beginning of valueGo

Go: invalid character '<' looking for beginning of value

The decoder received something that is not JSON — often an HTML error page, an empty body or plain text.