Skip to content

E0407: No provider for a dependency ​

A handler, a hook, a cron, a service or a constructor takes a pointer or interface the container doesn't have. The message says who needs it, at its file and line, and names the parameter and its type. Reported at boot.

Wrong ​

go
func OpenDB() (*DB, error) { … }

app := web.New()   // ListPets takes a *DB
go
func OpenDB() (*DB, error) { … }

app := web.New(web.Provide(OpenDB))

Released under the MIT License. Vuka builds on Go and its tools, which are made by the Go Authors. Vuka is not affiliated with Google or the Go project. Go is a trademark of Google LLC.