Skip to content

Commit b946b69

Browse files
committed
refactor: Split the library code from the provider code.
1 parent f4341db commit b946b69

11 files changed

+424
-463
lines changed

corefunc/provider_test.go

-22
This file was deleted.

corefunc/truncate_label.go

+9
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ shared prefix, but also truncate them appropriately to fit length
3232
constraints.
3333
*/
3434
func TruncateLabel(maxLength int64, prefix, label string) string {
35+
// origName := fmt.Sprintf("%s: %s", prefix, label)
36+
// strLen := int64(len(origName))
37+
3538
// None.
3639
if maxLength == 0 {
3740
return ""
@@ -74,6 +77,12 @@ func TruncateLabel(maxLength int64, prefix, label string) string {
7477
trimmedLabel := label[:removeFromLabelLength]
7578

7679
return strings.TrimSpace(trimmedPrefix) + "…: " + strings.TrimSpace(trimmedLabel) + "…"
80+
81+
// return fmt.Sprintf(
82+
// "%s…: %s…",
83+
// strings.TrimSpace(trimmedPrefix),
84+
// strings.TrimSpace(trimmedLabel),
85+
// )
7786
}
7887

7988
return origName

0 commit comments

Comments
 (0)