Skip to content

Commit

Permalink
chore: fix import lint
Browse files Browse the repository at this point in the history
Signed-off-by: Jiyong Huang <[email protected]>
  • Loading branch information
ngjaying committed Aug 15, 2024
1 parent 1e50ced commit 38d799b
Show file tree
Hide file tree
Showing 217 changed files with 325 additions and 172 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ jobs:
with:
version: latest
working-directory: sdk/go
args: "--out-${NO_FUTURE}format line-number"
args: "--out-${NO_FUTURE}format line-number --config=.gosdkci.yaml"
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ linters-settings:
sections:
- standard
- default
- prefix(github.com/lf-edge/ekuiper)
- prefix(github.com/lf-edge/ekuiper/v2)
staticcheck:
go: '1.22'
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"strings"

"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/pkg/ast"
)

Expand Down
3 changes: 1 addition & 2 deletions extensions/functions/geohash/geohash.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ package main
import (
"fmt"

"github.com/mmcloughlin/geohash"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/mmcloughlin/geohash"
)

type (
Expand Down
3 changes: 1 addition & 2 deletions extensions/functions/image/resize.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ import (
"image/jpeg"
"image/png"

"github.com/nfnt/resize"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/nfnt/resize"
)

type imageResize struct{}
Expand Down
3 changes: 1 addition & 2 deletions extensions/functions/image/thumbnail.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ import (
"image/jpeg"
"image/png"

"github.com/nfnt/resize"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/nfnt/resize"
)

type thumbnail struct{}
Expand Down
5 changes: 2 additions & 3 deletions extensions/functions/labelImage/labelImage.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ import (
"sort"
"sync"

tflite "github.com/mattn/go-tflite" //nolint:typecheck
"github.com/nfnt/resize"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/mattn/go-tflite" //nolint:typecheck
"github.com/nfnt/resize"
)

type labelImage struct {
Expand Down
2 changes: 1 addition & 1 deletion extensions/functions/tfLite/tfLite.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ package main
import (
"fmt"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/mattn/go-tflite"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/lf-edge/ekuiper/v2/pkg/cast"
)

Expand Down
1 change: 1 addition & 0 deletions extensions/functions/tfLite/tfLite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"testing"

"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/internal/conf"
"github.com/lf-edge/ekuiper/v2/internal/pkg/def"
kctx "github.com/lf-edge/ekuiper/v2/internal/topo/context"
Expand Down
1 change: 1 addition & 0 deletions extensions/impl/image/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"time"

"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/pkg/cast"
"github.com/lf-edge/ekuiper/v2/pkg/timex"
)
Expand Down
2 changes: 1 addition & 1 deletion extensions/impl/influx/influx.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"time"

client "github.com/influxdata/influxdb1-client/v2"

"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/extensions/impl/tspoint"
"github.com/lf-edge/ekuiper/v2/pkg/cast"
"github.com/lf-edge/ekuiper/v2/pkg/cert"
Expand Down
2 changes: 1 addition & 1 deletion extensions/impl/influx2/influx2.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (

client "github.com/influxdata/influxdb-client-go/v2"
"github.com/influxdata/influxdb-client-go/v2/api/write"

"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/extensions/impl/tspoint"
"github.com/lf-edge/ekuiper/v2/pkg/cast"
"github.com/lf-edge/ekuiper/v2/pkg/cert"
Expand Down
2 changes: 1 addition & 1 deletion extensions/impl/kafka/sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
"fmt"
"strings"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/pingcap/failpoint"
kafkago "github.com/segmentio/kafka-go"
"github.com/segmentio/kafka-go/sasl"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/lf-edge/ekuiper/v2/pkg/cast"
"github.com/lf-edge/ekuiper/v2/pkg/cert"
)
Expand Down
2 changes: 1 addition & 1 deletion extensions/impl/kafka/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ import (
"strings"
"time"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/pingcap/failpoint"
kafkago "github.com/segmentio/kafka-go"
"github.com/segmentio/kafka-go/sasl"
"github.com/segmentio/kafka-go/sasl/plain"
"github.com/segmentio/kafka-go/sasl/scram"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/lf-edge/ekuiper/v2/internal/conf"
"github.com/lf-edge/ekuiper/v2/pkg/cast"
"github.com/lf-edge/ekuiper/v2/pkg/cert"
Expand Down
1 change: 1 addition & 0 deletions extensions/impl/random/random.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"time"

"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/pkg/cast"
"github.com/lf-edge/ekuiper/v2/pkg/message"
)
Expand Down
1 change: 1 addition & 0 deletions extensions/impl/sql/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"sync"

"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/pkg/modules"
"github.com/lf-edge/ekuiper/v2/pkg/sqldatabase/driver"
)
Expand Down
2 changes: 1 addition & 1 deletion extensions/impl/sql/lookupSource.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"fmt"
"strings"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/pingcap/failpoint"

"github.com/lf-edge/ekuiper/contract/v2/api"
client2 "github.com/lf-edge/ekuiper/v2/extensions/impl/sql/client"
"github.com/lf-edge/ekuiper/v2/internal/conf"
"github.com/lf-edge/ekuiper/v2/internal/topo/context"
Expand Down
1 change: 1 addition & 0 deletions extensions/impl/sql/sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"strings"

"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/extensions/impl/sql/client"
"github.com/lf-edge/ekuiper/v2/pkg/ast"
"github.com/lf-edge/ekuiper/v2/pkg/cast"
Expand Down
2 changes: 1 addition & 1 deletion extensions/impl/sql/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"reflect"
"time"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/pingcap/failpoint"

"github.com/lf-edge/ekuiper/contract/v2/api"
client2 "github.com/lf-edge/ekuiper/v2/extensions/impl/sql/client"
"github.com/lf-edge/ekuiper/v2/pkg/cast"
"github.com/lf-edge/ekuiper/v2/pkg/connection"
Expand Down
2 changes: 1 addition & 1 deletion extensions/impl/sql/source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"testing"
"time"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/pingcap/failpoint"
"github.com/stretchr/testify/require"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/lf-edge/ekuiper/v2/extensions/impl/sql/client"
"github.com/lf-edge/ekuiper/v2/extensions/impl/sql/testx"
"github.com/lf-edge/ekuiper/v2/internal/topo/context"
Expand Down
1 change: 1 addition & 0 deletions extensions/impl/tspoint/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"time"

"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/pkg/cast"
"github.com/lf-edge/ekuiper/v2/pkg/timex"
)
Expand Down
2 changes: 1 addition & 1 deletion extensions/impl/video/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"strings"
"time"

"github.com/lf-edge/ekuiper/contract/v2/api"
ffmpeg "github.com/u2takey/ffmpeg-go"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/lf-edge/ekuiper/v2/pkg/cast"
)

Expand Down
2 changes: 1 addition & 1 deletion extensions/impl/video/source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"errors"
"testing"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/stretchr/testify/assert"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/lf-edge/ekuiper/v2/pkg/mock"
mockContext "github.com/lf-edge/ekuiper/v2/pkg/mock/context"
"github.com/lf-edge/ekuiper/v2/pkg/model"
Expand Down
1 change: 1 addition & 0 deletions extensions/impl/zmq/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"errors"

"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/pkg/cast"
)

Expand Down
2 changes: 1 addition & 1 deletion extensions/impl/zmq/sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ package zmq
import (
"fmt"

"github.com/lf-edge/ekuiper/contract/v2/api"
zmq "github.com/pebbe/zmq4"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/lf-edge/ekuiper/v2/pkg/errorx"
)

Expand Down
2 changes: 1 addition & 1 deletion extensions/impl/zmq/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"context"
"fmt"

"github.com/lf-edge/ekuiper/contract/v2/api"
zmq "github.com/pebbe/zmq4"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/lf-edge/ekuiper/v2/pkg/timex"
)

Expand Down
1 change: 1 addition & 0 deletions extensions/sinks/image/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package main

import (
"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/extensions/impl/image"
)

Expand Down
2 changes: 1 addition & 1 deletion extensions/sinks/influx/influx.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ package main

import (
_ "github.com/influxdata/influxdb1-client/v2"

"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/extensions/impl/influx"
)

Expand Down
2 changes: 1 addition & 1 deletion extensions/sinks/influx2/influx2.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ package main

import (
_ "github.com/influxdata/influxdb-client-go/v2"

"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/extensions/impl/influx2"
)

Expand Down
1 change: 1 addition & 0 deletions extensions/sinks/kafka/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package kafka

import (
"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/extensions/impl/kafka"
)

Expand Down
1 change: 1 addition & 0 deletions extensions/sinks/sql/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package main

import (
"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/extensions/impl/sql"
)

Expand Down
1 change: 1 addition & 0 deletions extensions/sinks/zmq/zmq.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package main

import (
"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/extensions/impl/zmq"
)

Expand Down
1 change: 1 addition & 0 deletions extensions/sources/kafka/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package kafka

import (
"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/extensions/impl/sql"
)

Expand Down
1 change: 1 addition & 0 deletions extensions/sources/random/random.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package main

import (
"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/extensions/impl/random"
)

Expand Down
1 change: 1 addition & 0 deletions extensions/sources/sql/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package main

import (
"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/extensions/impl/sql"
)

Expand Down
1 change: 1 addition & 0 deletions extensions/sources/video/video.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package main

import (
"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/extensions/impl/video"
)

Expand Down
1 change: 1 addition & 0 deletions extensions/sources/zmq/zmq.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package main

import (
"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/extensions/impl/zmq"
)

Expand Down
3 changes: 2 additions & 1 deletion internal/binder/function/binder.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 EMQ Technologies Co., Ltd.
// Copyright 2022-2024 EMQ Technologies Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -19,6 +19,7 @@ import (
"fmt"

"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/internal/binder"
"github.com/lf-edge/ekuiper/v2/pkg/ast"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/binder/function/funcs_agg.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ package function
import (
"fmt"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/montanaflynn/stats"

"github.com/lf-edge/ekuiper/contract/v2/api"
"github.com/lf-edge/ekuiper/v2/pkg/ast"
"github.com/lf-edge/ekuiper/v2/pkg/cast"
)
Expand Down
3 changes: 2 additions & 1 deletion internal/binder/function/funcs_analytic.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 EMQ Technologies Co., Ltd.
// Copyright 2022-2024 EMQ Technologies Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -21,6 +21,7 @@ import (
"strconv"

"github.com/lf-edge/ekuiper/contract/v2/api"

"github.com/lf-edge/ekuiper/v2/pkg/ast"
"github.com/lf-edge/ekuiper/v2/pkg/cast"
)
Expand Down
Loading

0 comments on commit 38d799b

Please sign in to comment.