Skip to content

Commit

Permalink
Use slices package
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Aug 2, 2024
1 parent 1d9523d commit d787494
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import (
"net/http"
"os"
"runtime/debug"
"slices"
"sort"
"strings"
"sync"
"time"

"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
"github.com/nyaruka/courier/utils"
"github.com/nyaruka/gocommon/analytics"
"github.com/nyaruka/gocommon/httpx"
"github.com/nyaruka/gocommon/jsonx"
Expand Down Expand Up @@ -240,7 +240,7 @@ func (s *server) initializeChannelHandlers() {
// initialize handlers which are included/not-excluded in the config
for _, handler := range registeredHandlers {
channelType := string(handler.ChannelType())
if (includes == nil || utils.StringArrayContains(includes, channelType)) && (excludes == nil || !utils.StringArrayContains(excludes, channelType)) {
if (includes == nil || slices.Contains(includes, channelType)) && (excludes == nil || !slices.Contains(excludes, channelType)) {
err := handler.Initialize(s)
if err != nil {
log.Fatal(err)
Expand Down

0 comments on commit d787494

Please sign in to comment.