Skip to content

Commit

Permalink
golang.org/x/exp/slices -> slices; drop dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
mmetc committed Mar 12, 2024
1 parent cf41cfc commit 842a0eb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
6 changes: 4 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
"net/http"
"os"
"os/signal"
"slices"
"strings"
"syscall"

"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
log "github.com/sirupsen/logrus"
"golang.org/x/exp/slices"
"golang.org/x/sync/errgroup"

csbouncer "github.com/crowdsecurity/go-cs-bouncer"

Check failure on line 21 in cmd/root.go

View workflow job for this annotation

GitHub Actions / golangci-lint + codeql

missing go.sum entry for module providing package github.com/crowdsecurity/go-cs-bouncer (imported by github.com/crowdsecurity/cs-firewall-bouncer/cmd); to add:

Check failure on line 21 in cmd/root.go

View workflow job for this annotation

GitHub Actions / Test .deb packages

missing go.sum entry for module providing package github.com/crowdsecurity/go-cs-bouncer (imported by github.com/crowdsecurity/cs-firewall-bouncer/cmd); to add:

Check failure on line 21 in cmd/root.go

View workflow job for this annotation

GitHub Actions / Test .deb packages

missing go.sum entry for module providing package github.com/crowdsecurity/go-cs-bouncer (imported by github.com/crowdsecurity/cs-firewall-bouncer/cmd); to add:

Check failure on line 21 in cmd/root.go

View workflow job for this annotation

GitHub Actions / Build + tests

missing go.sum entry for module providing package github.com/crowdsecurity/go-cs-bouncer (imported by github.com/crowdsecurity/cs-firewall-bouncer/cmd); to add:
Expand Down Expand Up @@ -222,7 +222,9 @@ func Execute() error {
return errors.New("bouncer stream halted")
})

metricsProvider, err := csbouncer.NewMetricsProvider(bouncer.APIClient, bouncerType, *bouncer.MetricsInterval, metricsUpdater, log.StandardLogger())
interval := *bouncer.MetricsInterval

metricsProvider, err := csbouncer.NewMetricsProvider(bouncer.APIClient, bouncerType, interval, metricsUpdater, log.StandardLogger())
if err != nil {
return fmt.Errorf("unable to create metrics provider: %w", err)
}
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ go 1.21

require (
github.com/crowdsecurity/crowdsec v1.6.1-0.20240308133748-11e105ae1a80
github.com/crowdsecurity/go-cs-bouncer v0.0.14-0.20240311145229-ea2ead106063
github.com/crowdsecurity/go-cs-bouncer v0.0.14-0.20240311151039-162a124c6fe1
github.com/crowdsecurity/go-cs-lib v0.0.7
github.com/google/nftables v0.1.1-0.20230710063801-8a10f689006b
github.com/prometheus/client_golang v1.17.0
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.8.4
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
golang.org/x/sync v0.6.0
golang.org/x/sys v0.15.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,6 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
Expand Down
2 changes: 1 addition & 1 deletion pkg/iptables/iptables.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"errors"
"fmt"
"os/exec"
"slices"
"strings"

log "github.com/sirupsen/logrus"
"golang.org/x/exp/slices"

"github.com/crowdsecurity/crowdsec/pkg/models"

Expand Down

0 comments on commit 842a0eb

Please sign in to comment.