mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-13 18:00:34 -05:00
fix sonar cube bugs
Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,10 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Category: "server",
|
||||
Before: func(c *cli.Context) error {
|
||||
configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
err := configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if cfg.IDP.EncryptionSecretFile != "" {
|
||||
if err := ensureEncryptionSecretExists(cfg.IDP.EncryptionSecretFile); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user