How to create a registry group
File Naming Conventions
{{registry_group_name}}.go
: This file defines the registry group, including key components like structs, interfaces, constants, and variables.{{registry_group_name}}_test.go
: Includes tests for the registry group to ensure it functions as expected.
This structure ensures consistency and maintainability across different registries, making it easier for developers to contribute and collaborate effectively. For the rest of conventions please read Templating Conventions.
Creating a Registry Group
New Repository: You can start by creating a new repository on your GitHub account or organization. This will house your registry group functions.
Contributing to Official Registry: To add a new registry group to the official registry, submit a pull request (PR) after a discussion inside an issue. The official registry groups are organized under the
group/
folder.
To start, in your {{registry_group_name}}.go
file, create a function called RegistryGroup
respecting the following signature:
You can also create a group directly in your codebase without the need to create a new package. This is useful when you want to group registries that are specific to a project or a use case.
Once your group is defined, you can start using it in your projects. 🎉
Last updated