A component-oriented approach to building Golang applications
We want to see a world with great "building blocks" where you can quickly build whatever you want. Traditional "composability" is not enough, they need to integrate and hook into each other.
This library provides the core mechanisms needed to build out a modular and extensible component architecture for your application, which also extend into an ecosystem of "drop-in" reusable components.
There are two parts to this package that are designed to work with each other:
- An object registry for interface-based extension points and dependency injection
- A configuration API for settings, disabling objects, and picking interface backends
See the example wiki app repo.
After building out reusable components, a simple wiki with GitHub authentication could be put together in ~200 lines of Go as a single component.
Good libraries should have minimal dependencies. Here are the ones com uses and for what:
- github.com/spf13/afero (plugins, config tests)
- github.com/spf13/viper (config, config/viper)