NestJS-inspired, built for Go

gonestdependency injection for Go, done right.

Modules, providers, controllers, and a full request pipeline — the developer experience NestJS gives Node/TypeScript, without giving up idiomatic Go.

main.go
package mainimport "gonest.dev/gonest"type UserService struct{}func (s *UserService) List() []string { return []string{"Ada", "Grace"} }var UserProvider = gonest.NewProvider(func(provider *gonest.Provider) {  provider.Constructor(func() *UserService { return &UserService{} })})var UserController = gonest.NewController(func(controller *gonest.Controller) {  controller.Path("/users")  userService := gonest.MustInject[*UserService](controller)  controller.RouteGet("/", func(route *gonest.Route) {    route.Handler(func(ctx *gonest.RestContext) {      ctx.Json(userService.List())    })  })})var UserModule = gonest.NewModule(func(module *gonest.Module) {  module.Providers(UserProvider)  module.Controllers(UserController)})func main() {  app := gonest.MustNewApp[gonest.FiberApp](UserModule) // AppOptions is optional  app.MustListen(":3000")}

Everything a NestJS developer expects