Skip to content

Commit

Permalink
fix: fix slice init length
Browse files Browse the repository at this point in the history
  • Loading branch information
cuishuang authored Oct 4, 2024
1 parent 287545e commit 1090806
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion observability/observability.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func Register(observerType string, init InitFunc, cleanup CleanUpFunc) error {

// Registered returns the set of Registered observers
func Registered() []string {
obs := make([]string, len(observers))
obs := make([]string, 0, len(observers))
for k := range observers {
obs = append(obs, k)
}
Expand Down

0 comments on commit 1090806

Please sign in to comment.