Skip to content

Commit 0f3131f

Browse files
cuishuangARolek
authored andcommitted
fix: fix slice init length
1 parent e865326 commit 0f3131f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

observability/observability.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func Register(observerType string, init InitFunc, cleanup CleanUpFunc) error {
142142

143143
// Registered returns the set of Registered observers
144144
func Registered() []string {
145-
obs := make([]string, len(observers))
145+
obs := make([]string, 0, len(observers))
146146
for k := range observers {
147147
obs = append(obs, k)
148148
}

0 commit comments

Comments
 (0)