Skip to content

Commit

Permalink
refactor: change module name from asvec to github.com/aerospike/asvec
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelch-spike committed Dec 20, 2024
1 parent 43b7eac commit 178e587
Show file tree
Hide file tree
Showing 27 changed files with 57 additions and 30 deletions.
3 changes: 2 additions & 1 deletion cmd/flags/credentials_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
package flags

import (
"asvec/utils"
"testing"

"github.com/aerospike/asvec/utils"
)

func TestCredentialsFlag_Set(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion cmd/flags/optionals.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package flags

import (
"asvec/utils"
"fmt"
"strconv"
"strings"
"time"

"github.com/aerospike/asvec/utils"

Check failure on line 9 in cmd/flags/optionals.go

View workflow job for this annotation

GitHub Actions / lint

import 'github.com/aerospike/asvec/utils' is not allowed from list 'main' (depguard)

Check failure on line 9 in cmd/flags/optionals.go

View workflow job for this annotation

GitHub Actions / lint

import 'github.com/aerospike/asvec/utils' is not allowed from list 'main' (depguard)
)

const optionalEmptyString = "<nil>"
Expand Down
3 changes: 2 additions & 1 deletion cmd/flags/vector.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package flags

import (
"asvec/cmd/writers"
"fmt"
"strconv"
"strings"

"github.com/aerospike/asvec/cmd/writers"

Check failure on line 8 in cmd/flags/vector.go

View workflow job for this annotation

GitHub Actions / lint

import 'github.com/aerospike/asvec/cmd/writers' is not allowed from list 'main' (depguard)

Check failure on line 8 in cmd/flags/vector.go

View workflow job for this annotation

GitHub Actions / lint

import 'github.com/aerospike/asvec/cmd/writers' is not allowed from list 'main' (depguard)
)

// A cobra PFlag to parse and store a vector of floats or booleans.
Expand Down
3 changes: 2 additions & 1 deletion cmd/indexCreate.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package cmd

import (
"asvec/cmd/flags"
"context"
"encoding/json"
"fmt"
Expand All @@ -10,6 +9,8 @@ import (
"os"
"strings"

"github.com/aerospike/asvec/cmd/flags"

Check failure on line 12 in cmd/indexCreate.go

View workflow job for this annotation

GitHub Actions / lint

import 'github.com/aerospike/asvec/cmd/flags' is not allowed from list 'main' (depguard)

avs "github.com/aerospike/avs-client-go"
"github.com/aerospike/avs-client-go/protos"
"github.com/spf13/cobra"
Expand Down
3 changes: 2 additions & 1 deletion cmd/indexDrop.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package cmd

import (
"asvec/cmd/flags"
"context"
"fmt"
"log/slog"

"github.com/aerospike/asvec/cmd/flags"

Check failure on line 8 in cmd/indexDrop.go

View workflow job for this annotation

GitHub Actions / lint

import 'github.com/aerospike/asvec/cmd/flags' is not allowed from list 'main' (depguard)

"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
Expand Down
3 changes: 2 additions & 1 deletion cmd/indexGC.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package cmd

import (
"asvec/cmd/flags"
"context"
"fmt"
"log/slog"

"github.com/aerospike/asvec/cmd/flags"

Check failure on line 8 in cmd/indexGC.go

View workflow job for this annotation

GitHub Actions / lint

import 'github.com/aerospike/asvec/cmd/flags' is not allowed from list 'main' (depguard)

"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
Expand Down
3 changes: 2 additions & 1 deletion cmd/indexList.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package cmd

import (
"asvec/cmd/flags"
"context"
"encoding/json"
"fmt"
"log/slog"
"sync"

"github.com/aerospike/asvec/cmd/flags"

"github.com/aerospike/avs-client-go/protos"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
Expand Down
3 changes: 2 additions & 1 deletion cmd/indexUpdate.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package cmd

import (
"asvec/cmd/flags"
"context"
"fmt"
"log/slog"

"github.com/aerospike/asvec/cmd/flags"

"github.com/aerospike/avs-client-go/protos"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
Expand Down
6 changes: 4 additions & 2 deletions cmd/nodeList.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package cmd

import (
"asvec/cmd/flags"
"asvec/cmd/writers"
"context"
"fmt"
"log/slog"
Expand All @@ -12,6 +10,10 @@ import (
"strings"
"sync"

"github.com/aerospike/asvec/cmd/writers"

Check failure on line 13 in cmd/nodeList.go

View workflow job for this annotation

GitHub Actions / lint

import 'github.com/aerospike/asvec/cmd/writers' is not allowed from list 'main' (depguard)

"github.com/aerospike/asvec/cmd/flags"

"github.com/aerospike/avs-client-go"
"github.com/aerospike/avs-client-go/protos"
"github.com/spf13/cobra"
Expand Down
3 changes: 2 additions & 1 deletion cmd/query.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package cmd

import (
"asvec/cmd/flags"
"context"
"fmt"
"log/slog"
"reflect"

"github.com/aerospike/asvec/cmd/flags"

"github.com/aerospike/avs-client-go"
"github.com/aerospike/avs-client-go/protos"
"github.com/spf13/cobra"
Expand Down
3 changes: 2 additions & 1 deletion cmd/rolesList.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package cmd

import (
"asvec/cmd/flags"
"context"
"fmt"
"log/slog"

"github.com/aerospike/asvec/cmd/flags"

"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
Expand Down
5 changes: 3 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package cmd

import (
"asvec/cmd/flags"
"context"
"fmt"
"log/slog"
"os"
"strings"

"github.com/aerospike/asvec/cmd/flags"

"github.com/aerospike/tools-common-go/config"
common "github.com/aerospike/tools-common-go/flags"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -63,7 +64,7 @@ asvec --help
}

cmd.SilenceUsage = true
config.SetDefaultConfName("asvec")
config.SetDefaultConfName("module asvec")
config.BindPFlags(cmd.Flags(), rootFlags.clusterName)

configFile, err := config.InitConfig(rootFlags.confFile, "", cmd.Flags())
Expand Down
3 changes: 2 additions & 1 deletion cmd/userCreate.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package cmd

import (
"asvec/cmd/flags"
"context"
"fmt"
"log/slog"

"github.com/aerospike/asvec/cmd/flags"

"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
Expand Down
3 changes: 2 additions & 1 deletion cmd/userDrop.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package cmd

import (
"asvec/cmd/flags"
"context"
"fmt"
"log/slog"

"github.com/aerospike/asvec/cmd/flags"

"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
Expand Down
3 changes: 2 additions & 1 deletion cmd/userGrant.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
package cmd

import (
"asvec/cmd/flags"
"context"
"fmt"
"log/slog"
"strings"

"github.com/aerospike/asvec/cmd/flags"

"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
Expand Down
3 changes: 2 additions & 1 deletion cmd/userList.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package cmd

import (
"asvec/cmd/flags"
"context"
"fmt"
"log/slog"

"github.com/aerospike/asvec/cmd/flags"

"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
Expand Down
3 changes: 2 additions & 1 deletion cmd/userNewPassword.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package cmd

import (
"asvec/cmd/flags"
"context"
"fmt"
"log/slog"

"github.com/aerospike/asvec/cmd/flags"

"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
Expand Down
3 changes: 2 additions & 1 deletion cmd/userRevoke.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
package cmd

import (
"asvec/cmd/flags"
"context"
"fmt"
"log/slog"
"strings"

"github.com/aerospike/asvec/cmd/flags"

"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
Expand Down
3 changes: 2 additions & 1 deletion cmd/utils.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package cmd

import (
"asvec/cmd/flags"
"context"
"fmt"
"log/slog"
"os"
"strings"

"github.com/aerospike/asvec/cmd/flags"

"golang.org/x/term"

avs "github.com/aerospike/avs-client-go"
Expand Down
3 changes: 2 additions & 1 deletion cmd/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
package cmd

import (
"asvec/cmd/flags"
"testing"

"github.com/aerospike/asvec/cmd/flags"

avs "github.com/aerospike/avs-client-go"
"github.com/stretchr/testify/assert"
)
Expand Down
3 changes: 2 additions & 1 deletion cmd/view.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package cmd

import (
"asvec/cmd/writers"
"fmt"
"io"
"log/slog"
"sync/atomic"

"github.com/aerospike/asvec/cmd/writers"

Check failure on line 9 in cmd/view.go

View workflow job for this annotation

GitHub Actions / lint

import 'github.com/aerospike/asvec/cmd/writers' is not allowed from list 'main' (depguard)

tableColor "github.com/jedib0t/go-pretty/v6/text"

"github.com/aerospike/avs-client-go"
Expand Down
3 changes: 2 additions & 1 deletion e2e_multi_node_LB_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
package main

import (
"asvec/tests"
"context"
"fmt"
"strings"
"testing"

"github.com/aerospike/asvec/tests"

avs "github.com/aerospike/avs-client-go"
"github.com/stretchr/testify/suite"
)
Expand Down
3 changes: 2 additions & 1 deletion e2e_multi_node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
package main

import (
"asvec/tests"
"context"
"fmt"
"strings"
"testing"

"github.com/aerospike/asvec/tests"

avs "github.com/aerospike/avs-client-go"
"github.com/stretchr/testify/suite"
)
Expand Down
6 changes: 4 additions & 2 deletions e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
package main

import (
"asvec/cmd/flags"
"asvec/tests"
"bytes"
"context"
"crypto/tls"
Expand All @@ -19,6 +17,10 @@ import (
"testing"
"time"

"github.com/aerospike/asvec/tests"

"github.com/aerospike/asvec/cmd/flags"

avs "github.com/aerospike/avs-client-go"
"github.com/aerospike/avs-client-go/protos"
"github.com/stretchr/testify/suite"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module asvec
module github.com/aerospike/asvec

go 1.22.0

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package main

import "asvec/cmd"
import "github.com/aerospike/asvec/cmd"

Check failure on line 3 in main.go

View workflow job for this annotation

GitHub Actions / lint

import 'github.com/aerospike/asvec/cmd' is not allowed from list 'main' (depguard)

func main() {
cmd.Execute()
Expand Down
3 changes: 2 additions & 1 deletion tests/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
package tests

import (
"asvec/utils"
"context"
"crypto/tls"
"crypto/x509"
Expand All @@ -14,6 +13,8 @@ import (
"os/exec"
"time"

"github.com/aerospike/asvec/utils"

avs "github.com/aerospike/avs-client-go"
"github.com/aerospike/avs-client-go/protos"
"github.com/aerospike/tools-common-go/client"
Expand Down

0 comments on commit 178e587

Please sign in to comment.