Skip to content

Commit

Permalink
fix: Fix wrong size for webhook array
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Nov 7, 2022
1 parent 741e845 commit cdd62ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/webhook/crud.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (a *App) List() (output []provider.Webhook) {
a.RLock()
defer a.RUnlock()

output = make([]provider.Webhook, len(a.webhooks))
output = make([]provider.Webhook, 0, len(a.webhooks))

for _, value := range a.webhooks {
index := sort.Search(len(output), func(i int) bool {
Expand Down

0 comments on commit cdd62ae

Please sign in to comment.