Loader System (Registry)
Need just 10 functions or want to create your own? Introducing: the Registry
Last updated
Need just 10 functions or want to create your own? Introducing: the Registry
Last updated
Sprout empowers you to create and manage your own registry of functions—a versatile collection that you can store, share, and seamlessly integrate into your projects. Additionally, you can leverage functions contributed by other users, enhancing collaboration and expanding the functionality of your applications.
Optimize Build Time: Use only the registry functions you need to reduce both build time and binary size.
Ease of Use: Import a registry with just one line of code for quick integration.
Reusability: Reuse functions across multiple projects without redundancy.
Collaboration: Incorporate registries created by others to enhance your projects.
Sharing: Share your registry with others or keep it private.
Versioning: Manage specific versions of a registry as a Go package to ensure consistency across projects.
To use a registry in a project, follow these steps:
You can also use the option to add registries when initializing the handler:
This code sets up your project to utilize the functions from your custom registry, making it easy to integrate and extend functionality.
To show how to create your own registry, go to How to create a registry
You can use the feature to manage multiple registries at once or use built-in groups.