fix sonar cube bugs

Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
Christian Richter
2024-10-14 08:39:42 +02:00
parent 0094d30378
commit 61070e3187
3 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ import (
// NewNatsCheck checks the reachability of a nats server.
func NewNatsCheck(natsCluster string, options ...nats.Option) func(context.Context) error {
return func(ctx context.Context) error {
return func(_ context.Context) error {
n, err := nats.Connect(natsCluster, options...)
if err != nil {
return fmt.Errorf("could not connect to nats server: %v", err)
+2 -2
View File
@@ -7,7 +7,7 @@ import (
// NewTCPCheck returns a check that connects to a given tcp endpoint.
func NewTCPCheck(address string) func(ctx context.Context) error {
return func(ctx context.Context) error {
return func(_ context.Context) error {
conn, err := net.Dial("tcp", address)
if err != nil {
return err
@@ -17,7 +17,7 @@ func NewTCPCheck(address string) func(ctx context.Context) error {
if err != nil {
return err
}
return nil
}
}