Skip to content

Commit

Permalink
lint: sort imports
Browse files Browse the repository at this point in the history
  • Loading branch information
ajatprabha committed Jun 20, 2024
1 parent 16b5882 commit bd72167
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 13 deletions.
3 changes: 2 additions & 1 deletion xworker/backoff_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package xworker

import (
"github.com/stretchr/testify/assert"
"testing"
"time"

"github.com/stretchr/testify/assert"
)

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

"github.com/gojekfarm/xtools/xworker"
"github.com/rs/zerolog/log"

"github.com/gojekfarm/xtools/xworker"
)

func ExampleNewAdapter() {
Expand Down
1 change: 1 addition & 0 deletions xworker/gocraft/enqueuer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"time"

"github.com/gojek/work"

"github.com/gojekfarm/xtools/xworker"
)

Expand Down
3 changes: 2 additions & 1 deletion xworker/gocraft/enqueuer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ import (

"github.com/alicebob/miniredis/v2"
"github.com/gojek/work"
"github.com/gojekfarm/xtools/xworker"
"github.com/gomodule/redigo/redis"
"github.com/rs/zerolog/log"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"

"github.com/gojekfarm/xtools/xworker"
)

type mapAlias map[string]interface{}
Expand Down
5 changes: 3 additions & 2 deletions xworker/gocraft/fulfiller.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import (

"github.com/gojek/work"
"github.com/gojek/work/webui"
"github.com/gojekfarm/xtools/xworker"
"github.com/gojekfarm/xtools/xworker/gocraft/internal/sentinel"
"github.com/gomodule/redigo/redis"
"github.com/rs/zerolog"

"github.com/gojekfarm/xtools/xworker"
"github.com/gojekfarm/xtools/xworker/gocraft/internal/sentinel"
)

var randInt63n = rand.New(rand.NewSource(time.Now().UnixNano())).Int63n
Expand Down
3 changes: 2 additions & 1 deletion xworker/gocraft/fulfiller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import (
"github.com/Bose/minisentinel"
"github.com/alicebob/miniredis/v2"
"github.com/gojek/work"
"github.com/gojekfarm/xtools/xworker"
"github.com/gomodule/redigo/redis"
"github.com/stretchr/testify/suite"

"github.com/gojekfarm/xtools/xworker"
)

type WorkerFulfillerSuite struct {
Expand Down
3 changes: 2 additions & 1 deletion xworker/gocraft/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import (
"time"

"github.com/alicebob/miniredis/v2"
"github.com/gojekfarm/xtools/xworker"
"github.com/gomodule/redigo/redis"
"github.com/stretchr/testify/assert"

"github.com/gojekfarm/xtools/xworker"
)

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

"github.com/alicebob/miniredis/v2"
"github.com/gojekfarm/xtools/xworker"
"github.com/gomodule/redigo/redis"
"github.com/stretchr/testify/suite"

"github.com/gojekfarm/xtools/xworker"
)

type customJob struct {
Expand Down
1 change: 1 addition & 0 deletions xworker/gocraft/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"reflect"

"github.com/gojek/work"

"github.com/gojekfarm/xtools/xworker"
)

Expand Down
8 changes: 5 additions & 3 deletions xworker/gocraft/register_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package gocraft

import (
"github.com/gojek/work"
"github.com/gojekfarm/xtools/xworker"
"github.com/stretchr/testify/assert"
"testing"
"time"

"github.com/gojek/work"
"github.com/stretchr/testify/assert"

"github.com/gojekfarm/xtools/xworker"
)

func TestFulfiller_backoffCalculatorFunc(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion xworker/gocraft/sentinel_dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package gocraft
import (
"context"

"github.com/gojekfarm/xtools/xworker/gocraft/internal/sentinel"
"github.com/gomodule/redigo/redis"
"github.com/sethvargo/go-retry"

"github.com/gojekfarm/xtools/xworker/gocraft/internal/sentinel"
)

func dialSentinelRedisWithRetry(opts SentinelPoolOptions, s *sentinel.Sentinel) func() (conn redis.Conn, err error) {
Expand Down
3 changes: 2 additions & 1 deletion xworker/gocraft/sentinel_dialer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package gocraft
import (
"testing"

"github.com/gojekfarm/xtools/xworker/gocraft/internal/sentinel"
"github.com/stretchr/testify/assert"

"github.com/gojekfarm/xtools/xworker/gocraft/internal/sentinel"
)

func Test_dialSentinelRedisWithRetry(t *testing.T) {
Expand Down

0 comments on commit bd72167

Please sign in to comment.