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 ( import (
"fmt" "fmt"
"github.com/aceld/kis-flow/common" "github.com/aceld/kis-flow/common"
) )

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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