From e90e86627c9b63ee304a32e7c58ac0ec28c86970 Mon Sep 17 00:00:00 2001 From: dd84ai Date: Tue, 26 Mar 2024 13:44:32 +0100 Subject: [PATCH] refactor: better default bases sorting --- darkstat/linker/linker.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/darkstat/linker/linker.go b/darkstat/linker/linker.go index 925f64d..4f888ad 100644 --- a/darkstat/linker/linker.go +++ b/darkstat/linker/linker.go @@ -7,6 +7,7 @@ into stuff rendered by fl-darkstat import ( "fmt" + "sort" "github.com/darklab8/fl-configs/configs/configs_export" "github.com/darklab8/fl-configs/configs/configs_mapped" @@ -44,6 +45,10 @@ func NewLinker(opts ...LinkOption) *Linker { func (l *Linker) Link() *builder.Builder { bases := l.configs.Bases(configs_export.NoNameIncluded(false)) + sort.Slice(bases, func(i, j int) bool { + return bases[i].Name < bases[j].Name + }) + build := builder.NewBuilder() build.RegComps( builder.NewComponent(