github.com/hidevopsio/hiboot (go): Package hiboot is a web/cli app application framework  Hiboot is a cloud native web and cli application framework written in Go.  Hiboot integrates the popular libraries but make them simpler, easier to use. It borrowed some of the Spring features like dependency injection, aspect oriented programming, and auto configuration. You can integrate any other libraries easily by auto configuration with dependency injection support. hiboot-data is the typical project that implement customized hiboot starters. see https://godoc.org/github.com/hidevopsio/hiboot-data  Overview  One of the most significant feature of Hiboot is Dependency Injection. Hiboot implements JSR-330 standard.  Let's say that we have two implementations of AuthenticationService, below will explain how does Hiboot work.  In Hiboot the injection into fields is triggered by `inject:""` struct tag. when inject tag is present on a field, Hiboot tries to resolve the object to inject by the type of the field. If several implementations of the same service interface are available, you have to disambiguate which implementation you want to be injected. This can be done by naming the field to specific implementation.  Although Field Injection is pretty convenient, but the Constructor Injection is the first-class citizen, we usually advise people to use constructor injection as it has below advantages,  It's testable, easy to implement unit test.  Syntax validation, with syntax validation on most of the IDEs to avoid typo.  No need to use a dedicated mechanism to ensure required properties are set.  type userController struct { at.RestController  basicAuthenticationService AuthenticationService }  // Hiboot will inject the implementation of AuthenticationService func newUserController(basicAuthenticationService AuthenticationService) { return &userController{ basicAuthenticationService: basicAuthenticationService, } }  func init() { app.Register(newUserController) }  Features  This section will show you how to create and run a simplest hiboot application. Let’s get started!  Get the source code  Source Code  This is a simple hello world example
Keywords: application|autoconfiguration|cli|cloudnative|command|command-line-tool|container|dependency-injection|di|golang|ioc|mvc|web|webapp