Skip to content

Commit

Permalink
Fix custom import section in linter configuration (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
muzzammilshahid authored Apr 2, 2024
1 parent ea2a2b1 commit 6e73a60
Show file tree
Hide file tree
Showing 35 changed files with 74 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ linters-settings:
sections:
- standard # Standard section: captures all standard packages.
- default # Default section: contains all imports that could not be matched to another section type.
- prefix(github.com/s-things) # Custom section: groups all imports with the specified Prefix.
- prefix(github.com/gammazero) # Custom section: groups all imports with the specified Prefix.
# Skip generated files.
# Default: true
#skip-generated: false
Expand Down
5 changes: 3 additions & 2 deletions aat/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"
"golang.org/x/crypto/pbkdf2"

"github.com/gammazero/nexus/v3/client"
"github.com/gammazero/nexus/v3/wamp"
"github.com/gammazero/nexus/v3/wamp/crsign"
"github.com/stretchr/testify/require"
"golang.org/x/crypto/pbkdf2"
)

const (
Expand Down
5 changes: 3 additions & 2 deletions aat/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"
"go.uber.org/goleak"

"github.com/gammazero/nexus/v3/client"
"github.com/gammazero/nexus/v3/router"
"github.com/gammazero/nexus/v3/router/auth"
"github.com/gammazero/nexus/v3/stdlog"
"github.com/gammazero/nexus/v3/transport/serialize"
"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"
"go.uber.org/goleak"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion aat/pubsub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import (
"testing"
"time"

"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/wamp"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion aat/registration_meta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/client"
"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion aat/rpc_progress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/client"
"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion aat/rpc_shared_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"context"
"testing"

"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/client"
"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"
)

func TestRPCSharedRoundRobin(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion aat/rpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/client"
"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"
)

func TestRPCRegisterAndCall(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion aat/session_meta_kill_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/client"
"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion aat/session_meta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/client"
"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion aat/session_testament_meta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import (
"testing"
"time"

"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/wamp"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion aat/sessionfilter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/client"
"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"
)

func TestWhitelistAttribute(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion aat/subscription_meta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/client"
"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"
)

const (
Expand Down
5 changes: 3 additions & 2 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"
"go.uber.org/goleak"

"github.com/gammazero/nexus/v3/router"
"github.com/gammazero/nexus/v3/router/auth"
"github.com/gammazero/nexus/v3/stdlog"
"github.com/gammazero/nexus/v3/wamp"
"github.com/gammazero/nexus/v3/wamp/crsign"
"github.com/stretchr/testify/require"
"go.uber.org/goleak"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion router/auth/anonymous_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package auth_test
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/router/auth"
"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"
)

func TestAnonAuth(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion router/auth/crauth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/router/auth"
"github.com/gammazero/nexus/v3/transport"
"github.com/gammazero/nexus/v3/wamp"
"github.com/gammazero/nexus/v3/wamp/crsign"
"github.com/stretchr/testify/require"
)

type testKeyStore struct {
Expand Down
3 changes: 2 additions & 1 deletion router/auth/cryptosign.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import (
"fmt"
"time"

"github.com/gammazero/nexus/v3/wamp"
"golang.org/x/crypto/nacl/sign"

"github.com/gammazero/nexus/v3/wamp"
)

type CryptoSignAuthenticator struct {
Expand Down
3 changes: 2 additions & 1 deletion router/authorizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"testing"
"time"

"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/wamp"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion router/broker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"testing"
"time"

"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/wamp"
)

type testPeer struct {
Expand Down
3 changes: 2 additions & 1 deletion router/dealer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/transport"
"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"
)

func newTestDealer(t *testing.T) (*dealer, wamp.Peer) {
Expand Down
3 changes: 2 additions & 1 deletion router/publishfilter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package router
import (
"testing"

"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/wamp"
)

func TestFilterBlacklist(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion router/rawsocketserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"context"
"testing"

"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/transport"
"github.com/gammazero/nexus/v3/transport/serialize"
"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"
)

const tcpAddr = "127.0.0.1:8181"
Expand Down
5 changes: 3 additions & 2 deletions router/router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"
"go.uber.org/goleak"

"github.com/gammazero/nexus/v3/stdlog"
"github.com/gammazero/nexus/v3/transport"
"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"
"go.uber.org/goleak"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion router/sessionkill_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"testing"
"time"

"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/wamp"
)

func TestSessionKill(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion router/testaments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"testing"
"time"

"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/wamp"
)

func TestSessionTestaments(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion router/websocketserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ import (
"strings"
"time"

"github.com/gorilla/websocket"

"github.com/gammazero/nexus/v3/transport"
"github.com/gammazero/nexus/v3/transport/serialize"
"github.com/gammazero/nexus/v3/wamp"
"github.com/gorilla/websocket"
)

const (
Expand Down
5 changes: 3 additions & 2 deletions router/websocketserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import (
"net/http"
"testing"

"github.com/gorilla/websocket"
"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/transport"
"github.com/gammazero/nexus/v3/transport/serialize"
"github.com/gammazero/nexus/v3/wamp"
"github.com/gorilla/websocket"
"github.com/stretchr/testify/require"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion transport/localpeer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (
"testing"
"time"

"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/wamp"
)

func TestSendRecv(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion transport/serialize/cborserializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"errors"
"reflect"

"github.com/gammazero/nexus/v3/wamp"
"github.com/ugorji/go/codec"

"github.com/gammazero/nexus/v3/wamp"
)

var ch *codec.CborHandle
Expand Down
3 changes: 2 additions & 1 deletion transport/serialize/jsonserializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (
"errors"
"reflect"

"github.com/gammazero/nexus/v3/wamp"
"github.com/ugorji/go/codec"

"github.com/gammazero/nexus/v3/wamp"
)

var jh *codec.JsonHandle
Expand Down
3 changes: 2 additions & 1 deletion transport/serialize/msgpackserializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"errors"
"reflect"

"github.com/gammazero/nexus/v3/wamp"
"github.com/ugorji/go/codec"

"github.com/gammazero/nexus/v3/wamp"
)

var mh *codec.MsgpackHandle
Expand Down
3 changes: 2 additions & 1 deletion transport/serialize/serializer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import (
"reflect"
"testing"

"github.com/gammazero/nexus/v3/wamp"
"github.com/stretchr/testify/require"

"github.com/gammazero/nexus/v3/wamp"
)

var dataItem = []map[string]interface{}{{
Expand Down
Loading

0 comments on commit 6e73a60

Please sign in to comment.