You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose to get rid of ERB in favor of native Go templates. Go has powerful generation tools, and it's better to use them.
Motivation
In a Go project, it is generally better to use Go tools for template generation to maintain consistency and leverage the native capabilities of the language. Using Go templates instead of ERB (Embedded Ruby) will:
Improve maintainability by using a single language for both code and templates.
Enhance readability for Go developers who may not be familiar with Ruby.
Simplify the build process by reducing dependencies on external tools.
Tasks
Identify all ERB templates currently used in the project.
Convert each ERB template to an equivalent Go template.
Use Makefile (Taskfile, simple script) instead of Rakefile.
I propose to get rid of ERB in favor of native Go templates. Go has powerful generation tools, and it's better to use them.
Motivation
In a Go project, it is generally better to use Go tools for template generation to maintain consistency and leverage the native capabilities of the language. Using Go templates instead of ERB (Embedded Ruby) will:
Tasks
Example of converting one file
int_test.go.erb
toint_test.go.tmpl
Current ERB Template
Equivalent Go Template:
Links
The text was updated successfully, but these errors were encountered: