chore(lint): run golangci-lint --fix (#105)

This commit is contained in:
Luca Steeb
2024-01-16 01:34:07 +07:00
committed by GitHub
parent 8fc58865be
commit 0ad77d50cb
17 changed files with 39 additions and 22 deletions

View File

@@ -3,8 +3,9 @@ package client
import (
"crypto/tls"
"github.com/hatchet-dev/hatchet/internal/config/shared"
"github.com/spf13/viper"
"github.com/hatchet-dev/hatchet/internal/config/shared"
)
type ClientConfigFile struct {

View File

@@ -5,12 +5,13 @@ import (
"fmt"
"strconv"
"github.com/hatchet-dev/hatchet/internal/logger"
"github.com/hatchet-dev/hatchet/internal/validator"
"github.com/hatchet-dev/hatchet/pkg/errors"
"github.com/mitchellh/mapstructure"
"github.com/rs/zerolog"
"github.com/steebchen/prisma-client-go/runtime/types"
"github.com/hatchet-dev/hatchet/internal/logger"
"github.com/hatchet-dev/hatchet/internal/validator"
"github.com/hatchet-dev/hatchet/pkg/errors"
)
func ToJSONMap(data interface{}) (map[string]interface{}, error) {

View File

@@ -5,8 +5,9 @@ import (
"os"
"time"
"github.com/hatchet-dev/hatchet/internal/config/shared"
"github.com/rs/zerolog"
"github.com/hatchet-dev/hatchet/internal/config/shared"
)
func NewDefaultLogger(service string) zerolog.Logger {

View File

@@ -8,10 +8,11 @@ import (
"os"
"time"
"github.com/hatchet-dev/hatchet/internal/logger"
"github.com/hatchet-dev/hatchet/internal/taskqueue"
amqp "github.com/rabbitmq/amqp091-go"
"github.com/rs/zerolog"
"github.com/hatchet-dev/hatchet/internal/logger"
"github.com/hatchet-dev/hatchet/internal/taskqueue"
)
// session composes an amqp.Connection with an amqp.Channel

View File

@@ -6,6 +6,7 @@ import (
v10Validator "github.com/go-playground/validator/v10"
"github.com/hashicorp/go-multierror"
"github.com/hatchet-dev/hatchet/api/v1/server/oas/gen"
"github.com/hatchet-dev/hatchet/pkg/errors"
)

View File

@@ -7,6 +7,7 @@ import (
"github.com/Masterminds/semver/v3"
"github.com/go-playground/validator/v10"
"github.com/google/uuid"
"github.com/hatchet-dev/hatchet/pkg/client/types"
)

View File

@@ -7,14 +7,15 @@ import (
"time"
"github.com/Masterminds/semver/v3"
admincontracts "github.com/hatchet-dev/hatchet/internal/services/admin/contracts"
"github.com/hatchet-dev/hatchet/internal/validator"
"github.com/hatchet-dev/hatchet/pkg/client/types"
"github.com/rs/zerolog"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/timestamppb"
admincontracts "github.com/hatchet-dev/hatchet/internal/services/admin/contracts"
"github.com/hatchet-dev/hatchet/internal/validator"
"github.com/hatchet-dev/hatchet/pkg/client/types"
)
type AdminClient interface {

View File

@@ -4,13 +4,14 @@ import (
"crypto/tls"
"fmt"
"github.com/rs/zerolog"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"github.com/hatchet-dev/hatchet/internal/logger"
"github.com/hatchet-dev/hatchet/internal/validator"
"github.com/hatchet-dev/hatchet/pkg/client/loader"
"github.com/hatchet-dev/hatchet/pkg/client/types"
"github.com/rs/zerolog"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
)
type Client interface {

View File

@@ -9,13 +9,14 @@ import (
"strconv"
"time"
dispatchercontracts "github.com/hatchet-dev/hatchet/internal/services/dispatcher/contracts"
"github.com/hatchet-dev/hatchet/internal/validator"
"github.com/rs/zerolog"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/timestamppb"
dispatchercontracts "github.com/hatchet-dev/hatchet/internal/services/dispatcher/contracts"
"github.com/hatchet-dev/hatchet/internal/validator"
)
type DispatcherClient interface {

View File

@@ -4,11 +4,12 @@ import (
"context"
"encoding/json"
eventcontracts "github.com/hatchet-dev/hatchet/internal/services/ingestor/contracts"
"github.com/hatchet-dev/hatchet/internal/validator"
"github.com/rs/zerolog"
"google.golang.org/grpc"
"google.golang.org/protobuf/types/known/timestamppb"
eventcontracts "github.com/hatchet-dev/hatchet/internal/services/ingestor/contracts"
"github.com/hatchet-dev/hatchet/internal/validator"
)
type EventClient interface {

View File

@@ -9,6 +9,7 @@ import (
"strings"
"github.com/gorilla/schema"
hatcheterrors "github.com/hatchet-dev/hatchet/pkg/errors"
)

View File

@@ -4,9 +4,10 @@ import (
"fmt"
"net/http"
"github.com/rs/zerolog"
"github.com/hatchet-dev/hatchet/internal/validator"
"github.com/hatchet-dev/hatchet/pkg/errors"
"github.com/rs/zerolog"
)
type RequestDecoderValidator interface {

View File

@@ -5,8 +5,9 @@ import (
"errors"
"net/http"
hatcheterrors "github.com/hatchet-dev/hatchet/pkg/errors"
"github.com/rs/zerolog"
hatcheterrors "github.com/hatchet-dev/hatchet/pkg/errors"
)
type ErrorOpts struct {

View File

@@ -6,6 +6,7 @@ import (
"strconv"
"github.com/go-chi/chi"
"github.com/hatchet-dev/hatchet/pkg/errors"
)

View File

@@ -6,8 +6,9 @@ import (
"net/http"
"syscall"
hatcheterrors "github.com/hatchet-dev/hatchet/pkg/errors"
"github.com/rs/zerolog"
hatcheterrors "github.com/hatchet-dev/hatchet/pkg/errors"
)
type ResultWriter interface {

View File

@@ -4,8 +4,9 @@ import (
"context"
"fmt"
"github.com/hatchet-dev/hatchet/pkg/integrations"
"github.com/slack-go/slack"
"github.com/hatchet-dev/hatchet/pkg/integrations"
)
type SlackIntegration struct {

View File

@@ -9,12 +9,13 @@ import (
"sync"
"time"
"github.com/rs/zerolog"
"github.com/hatchet-dev/hatchet/internal/logger"
"github.com/hatchet-dev/hatchet/pkg/client"
"github.com/hatchet-dev/hatchet/pkg/client/types"
"github.com/hatchet-dev/hatchet/pkg/errors"
"github.com/hatchet-dev/hatchet/pkg/integrations"
"github.com/rs/zerolog"
)
type actionFunc func(args ...any) []any