Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 25, 2024
1 parent 76af2de commit d45eb07
Show file tree
Hide file tree
Showing 56 changed files with 120 additions and 103 deletions.
1 change: 1 addition & 0 deletions backend/controller/admin/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"net/url"

"connectrpc.com/connect"

ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1"
"github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect"
)
Expand Down
3 changes: 2 additions & 1 deletion backend/controller/admin/local_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import (
"fmt"
"path/filepath"

"github.com/alecthomas/types/optional"

"github.com/TBD54566975/ftl/backend/schema"
"github.com/TBD54566975/ftl/buildengine"
cf "github.com/TBD54566975/ftl/common/configuration"
"github.com/TBD54566975/ftl/common/projectconfig"
"github.com/alecthomas/types/optional"
)

// localClient reads and writes to local projectconfig files without making any network
Expand Down
3 changes: 1 addition & 2 deletions backend/controller/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import (
"fmt"
"time"

"github.com/reugn/go-quartz/logger"

"connectrpc.com/connect"
"github.com/alecthomas/types/optional"
"github.com/reugn/go-quartz/logger"
"google.golang.org/protobuf/types/known/durationpb"
"google.golang.org/protobuf/types/known/timestamppb"

Expand Down
2 changes: 1 addition & 1 deletion backend/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"encoding/binary"
"errors"
"fmt"
"github.com/TBD54566975/ftl/backend/controller/observability"
"hash"
"io"
"math/rand"
Expand Down Expand Up @@ -43,6 +42,7 @@ import (
"github.com/TBD54566975/ftl/backend/controller/dal"
"github.com/TBD54566975/ftl/backend/controller/ingress"
"github.com/TBD54566975/ftl/backend/controller/leases"
"github.com/TBD54566975/ftl/backend/controller/observability"
"github.com/TBD54566975/ftl/backend/controller/pubsub"
"github.com/TBD54566975/ftl/backend/controller/scaling"
"github.com/TBD54566975/ftl/backend/controller/scaling/localscaling"
Expand Down
2 changes: 1 addition & 1 deletion backend/controller/dal/fsm.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/TBD54566975/ftl/backend/controller/observability"
"time"

"github.com/alecthomas/types/optional"

"github.com/TBD54566975/ftl/backend/controller/leases"
"github.com/TBD54566975/ftl/backend/controller/observability"
"github.com/TBD54566975/ftl/backend/controller/sql"
dalerrs "github.com/TBD54566975/ftl/backend/dal"
"github.com/TBD54566975/ftl/backend/schema"
Expand Down
3 changes: 2 additions & 1 deletion backend/controller/ingress/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import (
"strconv"
"strings"

"github.com/alecthomas/types/optional"

"github.com/TBD54566975/ftl/backend/controller/dal"
"github.com/TBD54566975/ftl/backend/schema"
"github.com/alecthomas/types/optional"
)

// BuildRequestBody extracts the HttpRequest body from an HTTP request.
Expand Down
6 changes: 4 additions & 2 deletions backend/controller/observability/fsm.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ package observability
import (
"context"
"fmt"
"github.com/TBD54566975/ftl/backend/schema"
"github.com/TBD54566975/ftl/internal/observability"

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

"github.com/TBD54566975/ftl/backend/schema"
"github.com/TBD54566975/ftl/internal/observability"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion backend/controller/pubsub/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"context"
"time"

"github.com/jpillora/backoff"

"github.com/TBD54566975/ftl/backend/controller/dal"
"github.com/TBD54566975/ftl/backend/controller/scheduledtask"
"github.com/TBD54566975/ftl/internal/log"
"github.com/jpillora/backoff"
)

const (
Expand Down
1 change: 1 addition & 0 deletions backend/controller/sql/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"

"github.com/jackc/pgx/v5"
)

Expand Down
3 changes: 2 additions & 1 deletion backend/schema/metadatasubscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package schema
import (
"fmt"

schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema"
"google.golang.org/protobuf/proto"

schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema"
)

type MetadataSubscriber struct {
Expand Down
3 changes: 2 additions & 1 deletion backend/schema/metadatatypemap.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package schema
import (
"fmt"

schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema"
"google.golang.org/protobuf/reflect/protoreflect"

schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema"
)

type MetadataTypeMap struct {
Expand Down
3 changes: 2 additions & 1 deletion backend/schema/topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"fmt"
"strings"

schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema"
"google.golang.org/protobuf/proto"

schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema"
)

type Topic struct {
Expand Down
3 changes: 1 addition & 2 deletions buildengine/build_kotlin.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ import (
"sort"
"strings"

"github.com/TBD54566975/scaffolder"
"github.com/beevik/etree"
sets "github.com/deckarep/golang-set/v2"
"golang.org/x/exp/maps"

"github.com/TBD54566975/scaffolder"

"github.com/TBD54566975/ftl"
"github.com/TBD54566975/ftl/backend/schema"
"github.com/TBD54566975/ftl/internal"
Expand Down
1 change: 1 addition & 0 deletions buildengine/build_rust.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package buildengine
import (
"context"
"fmt"

"github.com/TBD54566975/ftl/backend/schema"
"github.com/TBD54566975/ftl/internal/exec"
"github.com/TBD54566975/ftl/internal/log"
Expand Down
1 change: 0 additions & 1 deletion cmd/ftl/cmd_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"os"

"connectrpc.com/connect"

"github.com/alecthomas/types/optional"

"github.com/TBD54566975/ftl/backend/controller/admin"
Expand Down
3 changes: 1 addition & 2 deletions cmd/ftl/cmd_dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import (
"fmt"
"time"

"golang.org/x/sync/errgroup"

"github.com/alecthomas/types/optional"
"golang.org/x/sync/errgroup"

"github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect"
"github.com/TBD54566975/ftl/buildengine"
Expand Down
2 changes: 1 addition & 1 deletion cmd/ftl/cmd_schema_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"os"

"connectrpc.com/connect"
"github.com/alecthomas/chroma/v2/quick"
"github.com/hexops/gotextdiff"
"github.com/hexops/gotextdiff/myers"
"github.com/hexops/gotextdiff/span"
Expand All @@ -18,7 +19,6 @@ import (
"github.com/TBD54566975/ftl/backend/schema"
"github.com/TBD54566975/ftl/internal/log"
"github.com/TBD54566975/ftl/internal/rpc"
"github.com/alecthomas/chroma/v2/quick"
)

type schemaDiffCmd struct {
Expand Down
1 change: 0 additions & 1 deletion cmd/ftl/cmd_secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"os"

"connectrpc.com/connect"

"github.com/alecthomas/types/optional"
"github.com/mattn/go-isatty"
"golang.org/x/term"
Expand Down
1 change: 0 additions & 1 deletion cmd/ftl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (

"github.com/TBD54566975/ftl"
"github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect"

"github.com/TBD54566975/ftl/common/projectconfig"
_ "github.com/TBD54566975/ftl/internal/automaxprocs" // Set GOMAXPROCS to match Linux container CPU quota.
"github.com/TBD54566975/ftl/internal/log"
Expand Down
5 changes: 2 additions & 3 deletions common/configuration/asm.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ import (
"net/url"
"time"

"github.com/TBD54566975/ftl/internal/rpc"
"github.com/alecthomas/types/optional"
"github.com/aws/aws-sdk-go-v2/service/secretsmanager"
"github.com/puzpuzpuz/xsync/v3"

"github.com/TBD54566975/ftl/backend/controller/leader"
"github.com/TBD54566975/ftl/backend/controller/leases"
"github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect"
"github.com/TBD54566975/ftl/internal/log"

"github.com/aws/aws-sdk-go-v2/service/secretsmanager"
"github.com/TBD54566975/ftl/internal/rpc"
)

type asmClient interface {
Expand Down
2 changes: 1 addition & 1 deletion common/configuration/asm_follower.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"net/url"
"time"

"connectrpc.com/connect"
"github.com/puzpuzpuz/xsync/v3"

"connectrpc.com/connect"
ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1"
"github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect"
)
Expand Down
6 changes: 3 additions & 3 deletions common/configuration/asm_leader.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (
"net/url"
"time"

"github.com/puzpuzpuz/xsync/v3"

"github.com/TBD54566975/ftl/internal/slices"
"github.com/alecthomas/types/optional"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/secretsmanager"
"github.com/aws/aws-sdk-go-v2/service/secretsmanager/types"
"github.com/aws/smithy-go"
"github.com/puzpuzpuz/xsync/v3"

"github.com/TBD54566975/ftl/internal/slices"
)

const asmLeaderSyncInterval = time.Minute * 5
Expand Down
5 changes: 3 additions & 2 deletions common/configuration/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import (
"sync"
"time"

"github.com/TBD54566975/ftl/internal/log"
"github.com/TBD54566975/ftl/internal/slices"
"github.com/alecthomas/types/optional"
"github.com/alecthomas/types/pubsub"
"github.com/puzpuzpuz/xsync/v3"

"github.com/TBD54566975/ftl/internal/log"
"github.com/TBD54566975/ftl/internal/slices"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion common/configuration/db_secret_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (
"fmt"
"net/url"

"github.com/TBD54566975/ftl/common/configuration/dal"
"github.com/alecthomas/types/optional"

"github.com/TBD54566975/ftl/common/configuration/dal"
)

// DBSecretResolver loads values a project's secrets from the given database.
Expand Down
1 change: 0 additions & 1 deletion common/configuration/manual_sync_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"time"

"github.com/alecthomas/atomic"

"github.com/alecthomas/types/optional"
"github.com/puzpuzpuz/xsync/v3"
)
Expand Down
3 changes: 1 addition & 2 deletions go-runtime/compile/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"strings"
"unicode"

"github.com/TBD54566975/scaffolder"
"github.com/alecthomas/types/optional"
sets "github.com/deckarep/golang-set/v2"
"golang.org/x/exp/maps"
Expand All @@ -22,8 +23,6 @@ import (
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/timestamppb"

"github.com/TBD54566975/scaffolder"

"github.com/TBD54566975/ftl"
schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema"
"github.com/TBD54566975/ftl/backend/schema"
Expand Down
3 changes: 2 additions & 1 deletion go-runtime/ftl/ftltest/fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import (
"reflect"
"strings"

"github.com/alecthomas/types/optional"

"github.com/TBD54566975/ftl/backend/schema"
"github.com/TBD54566975/ftl/common/configuration"
"github.com/TBD54566975/ftl/go-runtime/ftl"
"github.com/TBD54566975/ftl/go-runtime/internal"
"github.com/alecthomas/types/optional"
)

// pubSubEvent is a sum type for all events that can be published to the pubsub system.
Expand Down
5 changes: 3 additions & 2 deletions go-runtime/ftl/ftltest/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import (
"sync"
"time"

"github.com/alecthomas/types/optional"
"github.com/alecthomas/types/pubsub"

"github.com/TBD54566975/ftl/backend/schema"
"github.com/TBD54566975/ftl/go-runtime/ftl"
"github.com/TBD54566975/ftl/internal/log"
"github.com/TBD54566975/ftl/internal/slices"
"github.com/alecthomas/types/optional"
"github.com/alecthomas/types/pubsub"
)

type fakePubSub struct {
Expand Down
2 changes: 1 addition & 1 deletion go-runtime/ftl/leases.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"time"

"connectrpc.com/connect"
"github.com/alecthomas/types/optional"
"google.golang.org/protobuf/types/known/durationpb"

ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1"
Expand All @@ -18,7 +19,6 @@ import (
"github.com/TBD54566975/ftl/internal/log"
"github.com/TBD54566975/ftl/internal/modulecontext"
"github.com/TBD54566975/ftl/internal/rpc"
"github.com/alecthomas/types/optional"
)

// ErrLeaseHeld is returned when an attempt is made to acquire a lease that is
Expand Down
3 changes: 2 additions & 1 deletion go-runtime/ftl/reflection/type_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package reflection
import (
"reflect"

"github.com/TBD54566975/ftl/backend/schema"
"github.com/alecthomas/types/optional"

"github.com/TBD54566975/ftl/backend/schema"
)

// TypeRegistry is used for dynamic type resolution at runtime. It stores associations between sum type discriminators
Expand Down
1 change: 0 additions & 1 deletion go-runtime/internal/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"reflect"

"connectrpc.com/connect"

"github.com/puzpuzpuz/xsync/v3"

ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1"
Expand Down
7 changes: 4 additions & 3 deletions go-runtime/schema/call/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import (
"go/types"
"strings"

"github.com/TBD54566975/ftl/backend/schema"
"github.com/TBD54566975/ftl/backend/schema/strcase"
"github.com/TBD54566975/ftl/go-runtime/schema/common"
"github.com/TBD54566975/golang-tools/go/analysis"
"github.com/TBD54566975/golang-tools/go/analysis/passes/inspect"
"github.com/TBD54566975/golang-tools/go/ast/inspector"

"github.com/TBD54566975/ftl/backend/schema"
"github.com/TBD54566975/ftl/backend/schema/strcase"
"github.com/TBD54566975/ftl/go-runtime/schema/common"
)

const (
Expand Down
Loading

0 comments on commit d45eb07

Please sign in to comment.