Golang Template

Sombra Template is a collection of YAML files and Go templates that are located alongside the code that will be replicated. These files define template patterns that can be dynamically generated in a target repository. The generated content is customized using variables specified in the sombra.yaml file. This approach allows for efficient and flexible project replication, enabling developers to reuse existing components while tailoring the outcome based on specific configurations or requirements, thus streamlining project setup and standardization processes.

Available Functions

In addition to the built-in functions available in Go templates, Sombra Templates also support a rich set of utility functions implemented through the Sprig library. Sprig provides a variety of useful template functions for string manipulation, math, list operations, date formatting, and more, enhancing the flexibility and capabilities of Sombra templates.

Variables

All variables used in the templates, will be defined in the sombra.yaml file in the target repository. As a best practice, variables can also be specified in the template definitions.