Improved label consistency

This commit is contained in:
Eduard Urbach 2025-02-21 17:04:13 +01:00
parent a8d15a4305
commit 1268344238
Signed by: eduard
GPG key ID: 49226B848C78F6C8
11 changed files with 36 additions and 31 deletions

18
src/core/CreateLabel.go Normal file
View file

@ -0,0 +1,18 @@
package core
import (
"strconv"
"strings"
)
// CreateLabel creates a label that is tied to this function by using a suffix.
func (f *Function) CreateLabel(prefix string, count int) string {
tmp := strings.Builder{}
tmp.WriteString(prefix)
tmp.WriteString(" ")
tmp.WriteString(strconv.Itoa(count))
tmp.WriteString(" [")
tmp.WriteString(f.UniqueName)
tmp.WriteString("]")
return tmp.String()
}