Skip to content

Commit

Permalink
[chore][cmd/builder] Improve main.go template formatting (#12503)
Browse files Browse the repository at this point in the history
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Puts the keys in `ConfigProviderSettings` to all be on their own lines
like the other keys in the struct.
  • Loading branch information
evan-bradley authored Feb 26, 2025
1 parent 2e4c56d commit 42cdb5f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 5 additions & 4 deletions cmd/builder/internal/builder/templates/main.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,17 @@ func main() {
DefaultScheme: "{{ .ConfResolver.DefaultURIScheme }}",
{{- end }}
},
}, ProviderModules: map[string]string{
},
ProviderModules: map[string]string{
{{- range .ConfmapProviders}}
{{.Name}}.NewFactory().Create(confmap.ProviderSettings{}).Scheme(): "{{.GoMod}}",
{{- end}}
}, ConverterModules: []string{
{{- range .ConfmapConverters}}
},
ConverterModules: []string{
{{- range .ConfmapConverters}}
"{{.GoMod}}",
{{- end}}
},

}

if err := run(set); err != nil {
Expand Down
6 changes: 4 additions & 2 deletions cmd/otelcorecol/main.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 42cdb5f

Please sign in to comment.