Skip to content

Commit

Permalink
gofumpt files
Browse files Browse the repository at this point in the history
  • Loading branch information
shaynafinocchiaro committed Feb 21, 2024
1 parent 746b167 commit 12bd879
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
8 changes: 3 additions & 5 deletions cmd/karavictl/cmd/role.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ import (
"errors"
"fmt"
"io"

Check failure on line 25 in cmd/karavictl/cmd/role.go

View workflow job for this annotation

GitHub Actions / golangci-lint

File is not `gofumpt`-ed (gofumpt)
"karavi-authorization/internal/role-service/roles"
"karavi-authorization/pb"
"log"
"net"
"net/url"
"os"
"strings"
"time"

Check failure on line 32 in cmd/karavictl/cmd/role.go

View workflow job for this annotation

GitHub Actions / golangci-lint

File is not `gofumpt`-ed (gofumpt)
"karavi-authorization/internal/role-service/roles"
"karavi-authorization/pb"

pscale "github.com/dell/goisilon"
pmax "github.com/dell/gopowermax/v2"
"github.com/dell/goscaleio"
Expand Down Expand Up @@ -192,7 +193,6 @@ func validatePowerFlexPool(storageSystemDetails System, storageSystemID string,
Username: storageSystemDetails.User,
Password: storageSystemDetails.Password,
})

if err != nil {
return fmt.Errorf("powerflex authentication failed: %+v", err)
}
Expand Down Expand Up @@ -377,7 +377,6 @@ func createRoleServiceClient(addr string, insecure bool) (pb.RoleServiceClient,
})
}),
grpc.WithInsecure())

if err != nil {
log.Fatal(err)
}
Expand All @@ -392,7 +391,6 @@ func createRoleServiceClient(addr string, insecure bool) (pb.RoleServiceClient,
conn, err = grpc.Dial(addr,
grpc.WithTransportCredentials(creds),
grpc.WithTimeout(10*time.Second))

if err != nil {
log.Fatal(err)
}
Expand Down
5 changes: 2 additions & 3 deletions cmd/karavictl/cmd/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ import (
"crypto/x509"
"fmt"
"io"

Check failure on line 22 in cmd/karavictl/cmd/storage.go

View workflow job for this annotation

GitHub Actions / golangci-lint

File is not `gofumpt`-ed (gofumpt)
"karavi-authorization/pb"
"log"
"net"
"os"
"time"

Check failure on line 27 in cmd/karavictl/cmd/storage.go

View workflow job for this annotation

GitHub Actions / golangci-lint

File is not `gofumpt`-ed (gofumpt)
"karavi-authorization/pb"

"github.com/spf13/cobra"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
Expand Down Expand Up @@ -81,7 +82,6 @@ func createStorageServiceClient(addr string, insecure bool) (pb.StorageServiceCl
})
}),
grpc.WithInsecure())

if err != nil {
log.Fatal(err)
}
Expand All @@ -96,7 +96,6 @@ func createStorageServiceClient(addr string, insecure bool) (pb.StorageServiceCl
conn, err = grpc.Dial(addr,
grpc.WithTransportCredentials(creds),
grpc.WithTimeout(10*time.Second))

if err != nil {
log.Fatal(err)
}
Expand Down
5 changes: 2 additions & 3 deletions internal/proxy/role_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ package proxy
import (
"encoding/json"
"fmt"
"net/http"

Check failure on line 18 in internal/proxy/role_handler.go

View workflow job for this annotation

GitHub Actions / golangci-lint

File is not `gofumpt`-ed (gofumpt)

"karavi-authorization/internal/web"
"karavi-authorization/pb"
"net/http"

"github.com/sirupsen/logrus"
"go.opentelemetry.io/otel/trace"
Expand Down Expand Up @@ -153,7 +154,6 @@ func (th *RoleHandler) updateHandler(w http.ResponseWriter, r *http.Request) err
Pool: body.Pool,
Quota: body.Quota,
})

if err != nil {
err = fmt.Errorf("updating role %s: %w", body, err)
handleJSONErrorResponse(th.log, w, http.StatusInternalServerError, err)
Expand Down Expand Up @@ -257,7 +257,6 @@ func (th *RoleHandler) deleteHandler(w http.ResponseWriter, r *http.Request) err
Pool: body.Pool,
Quota: body.Quota,
})

if err != nil {
err = fmt.Errorf("deleting role %s: %w", body, err)
handleJSONErrorResponse(th.log, w, http.StatusInternalServerError, err)
Expand Down
4 changes: 2 additions & 2 deletions internal/role-service/validate/powerflex.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ import (
"context"
"errors"
"fmt"
storage "karavi-authorization/cmd/karavictl/cmd"
"net/url"

storage "karavi-authorization/cmd/karavictl/cmd"

"github.com/dell/goscaleio"
"github.com/sirupsen/logrus"
)
Expand Down Expand Up @@ -57,7 +58,6 @@ func PowerFlex(_ context.Context, log *logrus.Entry, system storage.System, syst
Username: system.User,
Password: system.Password,
})

if err != nil {
return fmt.Errorf("powerflex authentication failed: %+v", err)
}
Expand Down
4 changes: 2 additions & 2 deletions internal/storage-service/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ package storage
import (
"context"
"fmt"
storage "karavi-authorization/cmd/karavictl/cmd"
"net/url"

storage "karavi-authorization/cmd/karavictl/cmd"

pscale "github.com/dell/goisilon"
pmax "github.com/dell/gopowermax/v2"
"github.com/dell/goscaleio"
Expand Down Expand Up @@ -91,7 +92,6 @@ func validatePowerflex(_ context.Context, _ *logrus.Entry, system storage.System
Username: system.User,
Password: system.Password,
})

if err != nil {
return fmt.Errorf("powerflex authentication failed: %+v", err)
}
Expand Down

0 comments on commit 12bd879

Please sign in to comment.