diff --git a/config/kis_func_config.go b/config/kis_func_config.go index dcf443c..507a762 100644 --- a/config/kis_func_config.go +++ b/config/kis_func_config.go @@ -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 diff --git a/flow/kis_flow_action.go b/flow/kis_flow_action.go index 0e3f551..b53fec5 100644 --- a/flow/kis_flow_action.go +++ b/flow/kis_flow_action.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "github.com/aceld/kis-flow/kis" ) diff --git a/flow/kis_flow_data.go b/flow/kis_flow_data.go index 9379eaf..7589b2a 100644 --- a/flow/kis_flow_data.go +++ b/flow/kis_flow_data.go @@ -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 diff --git a/go.mod b/go.mod index 248d313..c2d63e5 100644 --- a/go.mod +++ b/go.mod @@ -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 )