do some imports sort

This commit is contained in:
aceld 2024-04-15 18:18:40 +08:00
parent 955bed4804
commit 75dde9ad96
4 changed files with 11 additions and 5 deletions

View File

@ -1,7 +1,8 @@
package config
import (
"errors"
"fmt"
"github.com/aceld/kis-flow/common"
"github.com/aceld/kis-flow/log"
)
@ -75,7 +76,7 @@ func NewFuncConfig(
// AddConnConfig WithConn binds Function to Connector
func (fConf *KisFuncConfig) AddConnConfig(cConf *KisConnConfig) error {
if cConf == nil {
return errors.New("KisConnConfig is nil")
return fmt.Errorf("KisConnConfig is nil")
}
// Function needs to be associated with Connector
@ -93,7 +94,7 @@ func (fConf *KisFuncConfig) AddConnConfig(cConf *KisConnConfig) error {
// GetConnConfig gets the Connector configuration
func (fConf *KisFuncConfig) GetConnConfig() (*KisConnConfig, error) {
if fConf.connConf == nil {
return nil, errors.New("KisFuncConfig.connConf not set")
return nil, fmt.Errorf("KisFuncConfig.connConf not set")
}
return fConf.connConf, nil

View File

@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"github.com/aceld/kis-flow/kis"
)

View File

@ -4,13 +4,14 @@ import (
"context"
"errors"
"fmt"
"reflect"
"time"
"github.com/aceld/kis-flow/common"
"github.com/aceld/kis-flow/config"
"github.com/aceld/kis-flow/log"
"github.com/aceld/kis-flow/metrics"
"github.com/patrickmn/go-cache"
"reflect"
"time"
)
// CommitRow submits a single row of data to the Flow; multiple rows can be submitted multiple times

3
go.mod
View File

@ -17,6 +17,9 @@ require (
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/quasilyte/go-ruleguard v0.4.2 // indirect
github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect
github.com/quasilyte/go-ruleguard/rules v0.0.0-20240222105419-173c282c317c // indirect
golang.org/x/sys v0.19.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)