Improved label consistency
This commit is contained in:
parent
a8d15a4305
commit
1268344238
11 changed files with 36 additions and 31 deletions
18
src/core/CreateLabel.go
Normal file
18
src/core/CreateLabel.go
Normal 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()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue