Skip to content

Commit

Permalink
feat: fix linting issues
Browse files Browse the repository at this point in the history
Signed-off-by: Ramiz Polic <[email protected]>
  • Loading branch information
ramizpolic committed Sep 8, 2023
1 parent 1589c6e commit ed14edf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
4 changes: 0 additions & 4 deletions cmd/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@ package cmd
import (
"context"
"encoding/json"
"fmt"
"os"
"os/signal"

"github.com/bank-vaults/secret-sync/pkg/apis/v1alpha1"
"github.com/bank-vaults/secret-sync/pkg/provider"
"github.com/bank-vaults/secret-sync/pkg/storesync"
"github.com/ghodss/yaml"
"github.com/krayzpipes/cronticker/cronticker"
"github.com/sirupsen/logrus"
Expand Down
5 changes: 2 additions & 3 deletions pkg/provider/vault/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ package vault
import (
"context"
"fmt"
"regexp"
"strings"

"github.com/bank-vaults/vault-sdk/vault"
"github.com/spf13/cast"

"github.com/bank-vaults/secret-sync/pkg/apis/v1alpha1"
"regexp"
"strings"
)

type client struct {
Expand Down Expand Up @@ -135,7 +134,7 @@ func (c *client) SetSecret(_ context.Context, key v1alpha1.SecretRef, value []by
// It could (potentially) be useful.
// DEPRECATED
//nolint
func (c *client) recursiveList(ctx context.Context, path string) ([]v1alpha1.SecretKey, error) {
func (c *client) recursiveList(ctx context.Context, path string) ([]v1alpha1.SecretRef, error) {
// List API request
response, err := c.apiClient.RawClient().Logical().List(fmt.Sprintf("%s/metadata/%s", c.apiKeyPath, path))
if err != nil {
Expand Down
7 changes: 2 additions & 5 deletions pkg/storesync/storesync.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,13 @@ import (
"context"
"encoding/json"
"fmt"
"regexp"
"github.com/bank-vaults/secret-sync/pkg/apis/v1alpha1"
"github.com/sirupsen/logrus"
"golang.org/x/sync/errgroup"
"sync"
"sync/atomic"
"text/template"
"time"

"github.com/sirupsen/logrus"
"golang.org/x/sync/errgroup"

"github.com/bank-vaults/secret-sync/pkg/apis/v1alpha1"
)
Expand Down Expand Up @@ -171,7 +168,7 @@ func (s *kvStore) Fetch(ctx context.Context, source v1alpha1.StoreReader, ref v1
return fmt.Errorf("failed while doing query %v: %w", *ref.SecretQuery, err)
}

// Fetch key values from source parallely
// Fetch key values from source parallelly
procGroup, procCtx := errgroup.WithContext(ctx)
for _, key := range listKeys {
func(key v1alpha1.SecretRef) {
Expand Down

0 comments on commit ed14edf

Please sign in to comment.