goimports -l -w .

This commit is contained in:
aceld 2024-04-16 15:11:23 +08:00
parent e0e9b8144f
commit 8d8e693b30
40 changed files with 66 additions and 26 deletions

View File

@ -2,6 +2,7 @@ package config
import (
"fmt"
"github.com/aceld/kis-flow/common"
)

View File

@ -2,11 +2,12 @@ package conn
import (
"context"
"sync"
"github.com/aceld/kis-flow/common"
"github.com/aceld/kis-flow/config"
"github.com/aceld/kis-flow/id"
"github.com/aceld/kis-flow/kis"
"sync"
)
// KisConnector represents a KisConnector instance

View File

@ -2,9 +2,10 @@ package file
import (
"fmt"
"os"
"github.com/aceld/kis-flow/common"
"github.com/aceld/kis-flow/kis"
"os"
"gopkg.in/yaml.v3"
)

View File

@ -2,15 +2,16 @@ package file
import (
"fmt"
"os"
"path"
"path/filepath"
"github.com/aceld/kis-flow/common"
"github.com/aceld/kis-flow/config"
"github.com/aceld/kis-flow/flow"
"github.com/aceld/kis-flow/kis"
"github.com/aceld/kis-flow/metrics"
"gopkg.in/yaml.v3"
"os"
"path"
"path/filepath"
)
type allConfig struct {

View File

@ -3,6 +3,9 @@ package flow
import (
"context"
"errors"
"sync"
"time"
"github.com/aceld/kis-flow/common"
"github.com/aceld/kis-flow/config"
"github.com/aceld/kis-flow/conn"
@ -12,8 +15,6 @@ import (
"github.com/aceld/kis-flow/log"
"github.com/aceld/kis-flow/metrics"
"github.com/prometheus/client_golang/prometheus"
"sync"
"time"
"github.com/patrickmn/go-cache"
)

View File

@ -3,11 +3,12 @@ package function
import (
"context"
"errors"
"sync"
"github.com/aceld/kis-flow/common"
"github.com/aceld/kis-flow/config"
"github.com/aceld/kis-flow/id"
"github.com/aceld/kis-flow/kis"
"sync"
)
type BaseFunction struct {

View File

@ -2,6 +2,7 @@ package function
import (
"context"
"github.com/aceld/kis-flow/kis"
"github.com/aceld/kis-flow/log"
)

View File

@ -2,6 +2,7 @@ package function
import (
"context"
"github.com/aceld/kis-flow/kis"
"github.com/aceld/kis-flow/log"
)

View File

@ -2,6 +2,7 @@ package function
import (
"context"
"github.com/aceld/kis-flow/kis"
"github.com/aceld/kis-flow/log"
)

View File

@ -2,6 +2,7 @@ package function
import (
"context"
"github.com/aceld/kis-flow/kis"
"github.com/aceld/kis-flow/log"
)

View File

@ -2,6 +2,7 @@ package function
import (
"context"
"github.com/aceld/kis-flow/kis"
"github.com/aceld/kis-flow/log"
)

View File

@ -1,9 +1,10 @@
package id
import (
"strings"
"github.com/aceld/kis-flow/common"
"github.com/google/uuid"
"strings"
)
// KisID generates a random instance ID.

View File

@ -1,12 +1,13 @@
package metrics
import (
"net/http"
"github.com/aceld/kis-flow/common"
"github.com/aceld/kis-flow/config"
"github.com/aceld/kis-flow/log"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"net/http"
)
// KisMetrics kisFlow's Prometheus monitoring metrics

View File

@ -3,6 +3,7 @@ package caas
import (
"context"
"fmt"
"github.com/aceld/kis-flow/kis"
)

View File

@ -2,6 +2,7 @@ package caas
import (
"fmt"
"github.com/aceld/kis-flow/kis"
)

View File

@ -3,6 +3,7 @@ package faas
import (
"context"
"fmt"
"github.com/aceld/kis-flow/kis"
)

View File

@ -3,6 +3,7 @@ package faas
import (
"context"
"fmt"
"github.com/aceld/kis-flow/kis"
)

View File

@ -3,6 +3,7 @@ package faas
import (
"context"
"fmt"
"github.com/aceld/kis-flow/kis"
)

View File

@ -3,6 +3,7 @@ package faas
import (
"context"
"fmt"
"github.com/aceld/kis-flow/kis"
"github.com/aceld/kis-flow/log"
)

View File

@ -3,6 +3,7 @@ package faas
import (
"context"
"fmt"
"github.com/aceld/kis-flow/kis"
)

View File

@ -3,6 +3,7 @@ package faas
import (
"context"
"fmt"
"github.com/aceld/kis-flow/kis"
)

View File

@ -3,6 +3,7 @@ package faas
import (
"context"
"fmt"
"github.com/aceld/kis-flow/kis"
)

View File

@ -3,6 +3,7 @@ package faas
import (
"context"
"fmt"
"github.com/aceld/kis-flow/kis"
)

View File

@ -2,6 +2,7 @@ package faas
import (
"context"
"github.com/aceld/kis-flow/kis"
"github.com/aceld/kis-flow/serialize"
"github.com/aceld/kis-flow/test/proto"

View File

@ -3,6 +3,7 @@ package faas
import (
"context"
"fmt"
"github.com/aceld/kis-flow/kis"
"github.com/aceld/kis-flow/serialize"
"github.com/aceld/kis-flow/test/proto"

View File

@ -3,9 +3,10 @@ package test
import (
"context"
"fmt"
"testing"
"github.com/aceld/kis-flow/file"
"github.com/aceld/kis-flow/kis"
"testing"
)
func TestActionAbort(t *testing.T) {

View File

@ -2,6 +2,8 @@ package test
import (
"context"
"testing"
"github.com/aceld/kis-flow/common"
"github.com/aceld/kis-flow/config"
"github.com/aceld/kis-flow/file"
@ -9,7 +11,6 @@ import (
"github.com/aceld/kis-flow/kis"
"github.com/aceld/kis-flow/test/faas"
"github.com/aceld/kis-flow/test/proto"
"testing"
)
func TestAutoInjectParamWithConfig(t *testing.T) {

View File

@ -2,9 +2,10 @@ package test
import (
"fmt"
"testing"
"github.com/aceld/kis-flow/file"
"github.com/aceld/kis-flow/kis"
"testing"
)
func TestConfigExportYaml(t *testing.T) {

View File

@ -2,9 +2,10 @@ package test
import (
"context"
"testing"
"github.com/aceld/kis-flow/file"
"github.com/aceld/kis-flow/kis"
"testing"
)
func TestConfigImportYaml(t *testing.T) {

View File

@ -1,10 +1,11 @@
package test
import (
"testing"
"github.com/aceld/kis-flow/common"
"github.com/aceld/kis-flow/config"
"github.com/aceld/kis-flow/log"
"testing"
)
func TestNewFuncConfig(t *testing.T) {

View File

@ -2,10 +2,11 @@ package test
import (
"context"
"testing"
"github.com/aceld/kis-flow/common"
"github.com/aceld/kis-flow/config"
"github.com/aceld/kis-flow/flow"
"testing"
)
func TestNewKisConnector(t *testing.T) {

View File

@ -2,10 +2,11 @@ package test
import (
"context"
"testing"
"github.com/aceld/kis-flow/file"
"github.com/aceld/kis-flow/kis"
"github.com/aceld/kis-flow/log"
"testing"
)
func TestForkFlowCommitBatch(t *testing.T) {

View File

@ -2,10 +2,11 @@ package test
import (
"context"
"testing"
"github.com/aceld/kis-flow/common"
"github.com/aceld/kis-flow/config"
"github.com/aceld/kis-flow/flow"
"testing"
)
func TestNewKisFlow(t *testing.T) {

View File

@ -3,12 +3,13 @@ package test
import (
"context"
"fmt"
"testing"
"github.com/aceld/kis-flow/common"
"github.com/aceld/kis-flow/config"
"github.com/aceld/kis-flow/file"
"github.com/aceld/kis-flow/flow"
"github.com/aceld/kis-flow/kis"
"testing"
)
func TestForkFlow(t *testing.T) {

View File

@ -2,11 +2,12 @@ package test
import (
"context"
"testing"
"github.com/aceld/kis-flow/common"
"github.com/aceld/kis-flow/config"
"github.com/aceld/kis-flow/flow"
"github.com/aceld/kis-flow/function"
"testing"
)
func TestNewKisFunction(t *testing.T) {

View File

@ -2,8 +2,9 @@ package test
import (
"context"
"github.com/aceld/kis-flow/log"
"testing"
"github.com/aceld/kis-flow/log"
)
func TestKisLogger(t *testing.T) {

View File

@ -3,10 +3,11 @@ package test
import (
"context"
"fmt"
"github.com/aceld/kis-flow/file"
"github.com/aceld/kis-flow/kis"
"testing"
"time"
"github.com/aceld/kis-flow/file"
"github.com/aceld/kis-flow/kis"
)
func TestMetricsDataTotal(t *testing.T) {

View File

@ -2,9 +2,10 @@ package test
import (
"context"
"testing"
"github.com/aceld/kis-flow/file"
"github.com/aceld/kis-flow/kis"
"testing"
)
func TestParams(t *testing.T) {

View File

@ -2,10 +2,11 @@ package test
import (
"context"
"testing"
"github.com/aceld/kis-flow/common"
"github.com/aceld/kis-flow/config"
"github.com/aceld/kis-flow/flow"
"testing"
)
func TestNewKisPool(t *testing.T) {

View File

@ -1,8 +1,9 @@
package test
import (
"github.com/aceld/kis-flow/metrics"
"testing"
"github.com/aceld/kis-flow/metrics"
)
func TestPrometheusServer(t *testing.T) {