Showing 3 of 17 total issues
Function main
has 62 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func main() {
logFormat := os.Getenv("LOG_FORMAT")
switch logFormat {
case "json":
logrus.SetFormatter(&logrus.JSONFormatter{})
Method Wrapper.StoreSecret
has 5 return statements (exceeds 4 allowed). Open
Open
func (w Wrapper) StoreSecret(ctx context.Context, request StoreSecretRequestObject) (StoreSecretResponseObject, error) {
if request.Body.Secret == "" {
return StoreSecret400JSONResponse(ErrorResponse{
Backend: backend,
Detail: "Secret is required",
Method KVStorage.getValue
has 5 return statements (exceeds 4 allowed). Open
Open
func (v KVStorage) getValue(path, key string) ([]byte, error) {
result, err := v.client.Read(path)
if err != nil {
return nil, fmt.Errorf("unable to read key from vault: %w", err)
}