Skip to content

Commit

Permalink
chore: format all files with gci
Browse files Browse the repository at this point in the history
  • Loading branch information
ccoVeille committed Jan 18, 2025
1 parent 6000b94 commit 8807a48
Show file tree
Hide file tree
Showing 44 changed files with 35 additions and 58 deletions.
1 change: 1 addition & 0 deletions examples/grpc-server/grpc/hello_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package grpc

import (
"fmt"

"gofr.dev/pkg/gofr"
)

Expand Down
3 changes: 2 additions & 1 deletion examples/grpc-server/grpc/hello_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package grpc

import (
"context"
"gofr.dev/pkg/gofr"
"testing"

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

"gofr.dev/pkg/gofr"
)

func TestServer_SayHello(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions examples/sample-cmd/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"testing"

"github.com/stretchr/testify/assert"

"gofr.dev/pkg/gofr"
"gofr.dev/pkg/gofr/cmd"
"gofr.dev/pkg/gofr/cmd/terminal"
Expand Down
1 change: 1 addition & 0 deletions examples/using-cron-jobs/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"time"

"github.com/stretchr/testify/assert"

"gofr.dev/pkg/gofr/testutil"
)

Expand Down
1 change: 1 addition & 0 deletions examples/using-custom-metrics/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"time"

"github.com/stretchr/testify/assert"

"gofr.dev/pkg/gofr/testutil"
)

Expand Down
1 change: 1 addition & 0 deletions examples/using-file-bind/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (

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

"gofr.dev/pkg/gofr/testutil"
)

Expand Down
1 change: 1 addition & 0 deletions examples/using-migrations/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

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

"gofr.dev/pkg/gofr/testutil"
)

Expand Down
1 change: 1 addition & 0 deletions examples/using-publisher/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

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

"gofr.dev/pkg/gofr/testutil"
)

Expand Down
1 change: 1 addition & 0 deletions examples/using-web-socket/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

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

"gofr.dev/pkg/gofr/testutil"
)

Expand Down
1 change: 1 addition & 0 deletions pkg/gofr/container/health_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"testing"

"github.com/stretchr/testify/assert"

"gofr.dev/pkg/gofr/datasource"
"gofr.dev/pkg/gofr/datasource/sql"
"gofr.dev/pkg/gofr/logging"
Expand Down
1 change: 1 addition & 0 deletions pkg/gofr/container/mock_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"testing"

"go.uber.org/mock/gomock"

"gofr.dev/pkg/gofr/datasource"
"gofr.dev/pkg/gofr/datasource/file"
"gofr.dev/pkg/gofr/datasource/pubsub"
Expand Down
1 change: 1 addition & 0 deletions pkg/gofr/container/sql_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

"github.com/DATA-DOG/go-sqlmock"
"github.com/stretchr/testify/require"

"gofr.dev/pkg/gofr/datasource"
gofrSQL "gofr.dev/pkg/gofr/datasource/sql"
"gofr.dev/pkg/gofr/logging"
Expand Down
1 change: 0 additions & 1 deletion pkg/gofr/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (

"github.com/golang-jwt/jwt/v5"
"github.com/gorilla/websocket"

"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"

Expand Down
3 changes: 1 addition & 2 deletions pkg/gofr/datasource/cassandra/cassandra.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import (
"reflect"
"time"

"github.com/gocql/gocql"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"

"github.com/gocql/gocql"
)

const (
Expand Down
3 changes: 1 addition & 2 deletions pkg/gofr/datasource/cassandra/cassandra_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ import (
"errors"
"testing"

"go.opentelemetry.io/otel"

"github.com/gocql/gocql"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/otel"
"go.uber.org/mock/gomock"
)

Expand Down
4 changes: 1 addition & 3 deletions pkg/gofr/datasource/clickhouse/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import (
"strings"
"time"

"github.com/ClickHouse/clickhouse-go/v2"
"go.opentelemetry.io/otel/attribute"

"go.opentelemetry.io/otel/trace"

"github.com/ClickHouse/clickhouse-go/v2"
)

type Config struct {
Expand Down
5 changes: 2 additions & 3 deletions pkg/gofr/datasource/dgraph/dgraph.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ import (
"fmt"
"time"

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"

"github.com/dgraph-io/dgo/v210"
"github.com/dgraph-io/dgo/v210/protos/api"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)
Expand Down
5 changes: 2 additions & 3 deletions pkg/gofr/datasource/dgraph/dgraph_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ import (
"errors"
"testing"

"go.opentelemetry.io/otel"
"go.uber.org/mock/gomock"

"github.com/dgraph-io/dgo/v210/protos/api"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/otel"
"go.uber.org/mock/gomock"
)

var (
Expand Down
1 change: 0 additions & 1 deletion pkg/gofr/datasource/file/ftp/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"time"

"github.com/jlaffaye/ftp"

file_interface "gofr.dev/pkg/gofr/datasource/file"
)

Expand Down
1 change: 0 additions & 1 deletion pkg/gofr/datasource/file/ftp/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"time"

"github.com/jlaffaye/ftp"

file_interface "gofr.dev/pkg/gofr/datasource/file"
)

Expand Down
1 change: 0 additions & 1 deletion pkg/gofr/datasource/file/ftp/fs_dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"time"

"github.com/jlaffaye/ftp"

file_interface "gofr.dev/pkg/gofr/datasource/file"
)

Expand Down
3 changes: 1 addition & 2 deletions pkg/gofr/datasource/file/ftp/fs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"

"github.com/jlaffaye/ftp"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
)

Expand Down
1 change: 0 additions & 1 deletion pkg/gofr/datasource/file/s3/file_parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"time"

"github.com/aws/aws-sdk-go-v2/aws"

file "gofr.dev/pkg/gofr/datasource/file"
)

Expand Down
1 change: 0 additions & 1 deletion pkg/gofr/datasource/file/s3/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
awsConfig "github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/credentials"
"github.com/aws/aws-sdk-go-v2/service/s3"

file "gofr.dev/pkg/gofr/datasource/file"
)

Expand Down
4 changes: 1 addition & 3 deletions pkg/gofr/datasource/file/s3/fs_dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ import (
"strings"
"time"

"github.com/aws/aws-sdk-go-v2/service/s3/types"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/s3"

"github.com/aws/aws-sdk-go-v2/service/s3/types"
file "gofr.dev/pkg/gofr/datasource/file"
)

Expand Down
3 changes: 1 addition & 2 deletions pkg/gofr/datasource/file/s3/fs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ import (
"time"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/aws/aws-sdk-go-v2/service/s3"
"go.uber.org/mock/gomock"
)

Expand Down
4 changes: 1 addition & 3 deletions pkg/gofr/datasource/file/sftp/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ import (
"time"

"github.com/pkg/sftp"

"golang.org/x/crypto/ssh"

File "gofr.dev/pkg/gofr/datasource/file"
"golang.org/x/crypto/ssh"
)

const (
Expand Down
3 changes: 1 addition & 2 deletions pkg/gofr/datasource/kv-store/badger/badger.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import (
"strings"
"time"

"github.com/dgraph-io/badger/v4"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"

"github.com/dgraph-io/badger/v4"
)

var errStatusDown = errors.New("status down")
Expand Down
5 changes: 2 additions & 3 deletions pkg/gofr/datasource/mongo/mongo.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ import (
"strconv"
"time"

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"

"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"go.mongodb.org/mongo-driver/mongo/readpref"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
)

type Client struct {
Expand Down
4 changes: 1 addition & 3 deletions pkg/gofr/datasource/pubsub/eventhub/eventhub.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ import (
"strings"
"time"

"go.opentelemetry.io/otel/trace"

"github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs"
"github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/checkpoints"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/container"

"go.opentelemetry.io/otel/trace"
"gofr.dev/pkg/gofr/datasource"
"gofr.dev/pkg/gofr/datasource/pubsub"
)
Expand Down
5 changes: 1 addition & 4 deletions pkg/gofr/datasource/pubsub/eventhub/eventhub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ import (

"github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs"
"github.com/stretchr/testify/require"

"nhooyr.io/websocket"

"go.uber.org/mock/gomock"

"gofr.dev/pkg/gofr/testutil"
"nhooyr.io/websocket"
)

func TestConnect(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions pkg/gofr/datasource/pubsub/eventhub/logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import (
"bytes"
"testing"

"go.uber.org/mock/gomock"

"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
)

func Test_PrettyPrint(t *testing.T) {
Expand Down
1 change: 0 additions & 1 deletion pkg/gofr/datasource/pubsub/mqtt/default_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"sync"

mqtt "github.com/eclipse/paho.mqtt.golang"

"github.com/google/uuid"
)

Expand Down
1 change: 0 additions & 1 deletion pkg/gofr/datasource/pubsub/nats/connection_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (

"github.com/nats-io/nats.go"
"github.com/nats-io/nats.go/jetstream"

"gofr.dev/pkg/gofr/datasource"
"gofr.dev/pkg/gofr/datasource/pubsub"
)
Expand Down
1 change: 0 additions & 1 deletion pkg/gofr/datasource/pubsub/nats/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (

"github.com/nats-io/nats.go"
"github.com/nats-io/nats.go/jetstream"

"gofr.dev/pkg/gofr/datasource"
"gofr.dev/pkg/gofr/datasource/pubsub"
)
Expand Down
1 change: 0 additions & 1 deletion pkg/gofr/datasource/pubsub/nats/message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (

"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"

"gofr.dev/pkg/gofr/logging"
"gofr.dev/pkg/gofr/testutil"
)
Expand Down
2 changes: 0 additions & 2 deletions pkg/gofr/datasource/scylladb/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ import (

"github.com/gocql/gocql"
"github.com/stoewer/go-strcase"

"go.opentelemetry.io/otel/attribute"

"go.opentelemetry.io/otel/trace"
)

Expand Down
1 change: 0 additions & 1 deletion pkg/gofr/datasource/scylladb/scylladb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

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

"go.uber.org/mock/gomock"
)

Expand Down
1 change: 0 additions & 1 deletion pkg/gofr/datasource/solr/solr.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"time"

"go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace"

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
)
Expand Down
Loading

0 comments on commit 8807a48

Please sign in to comment.