refactor: reduce use of pointers in particular, Source can no longer be nil. Instantiate a Source with an Importer of All instead
1 file changed, 3 insertions(+), 3 deletions(-)
changed files
M internal/server/mux.go → internal/server/mux.go
@@ -24,7 +24,7 @@ Message string Code int } -var sources []*config.Source +var sources []config.Source func applyDevModeOverrides(cfg *config.Config) { if len(cfg.Web.ContentSecurityPolicy.ScriptSrc) == 0 {@@ -36,8 +36,8 @@ "'unsafe-inline'", ) } -func sortSources(ss map[string]*config.Source) { - sources = slices.SortedFunc(maps.Values(ss), func(a, b *config.Source) int { +func sortSources(ss map[string]config.Source) { + sources = slices.SortedFunc(maps.Values(ss), func(a, b config.Source) int { return cmp.Or( cmp.Compare(a.Order, b.Order), strings.Compare(a.Key, b.Key),