From 540fd353553ef257f5bca58ce8f4cae5e5c7f433 Mon Sep 17 00:00:00 2001 From: aceld Date: Tue, 16 Apr 2024 14:54:11 +0800 Subject: [PATCH] goimprts sort --- flow/kis_flow_data.go | 3 +-- kis/connector.go | 1 + serialize/serialize_default.go | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/flow/kis_flow_data.go b/flow/kis_flow_data.go index 7589b2a..070bd5b 100644 --- a/flow/kis_flow_data.go +++ b/flow/kis_flow_data.go @@ -11,7 +11,6 @@ import ( "github.com/aceld/kis-flow/config" "github.com/aceld/kis-flow/log" "github.com/aceld/kis-flow/metrics" - "github.com/patrickmn/go-cache" ) // CommitRow submits a single row of data to the Flow; multiple rows can be submitted multiple times @@ -174,7 +173,7 @@ func (flow *KisFlow) GetCacheData(key string) interface{} { func (flow *KisFlow) SetCacheData(key string, value interface{}, Exp time.Duration) { if Exp == common.DefaultExpiration { - flow.cache.Set(key, value, cache.DefaultExpiration) + flow.cache.Set(key, value, 0) } else { flow.cache.Set(key, value, Exp) } diff --git a/kis/connector.go b/kis/connector.go index 8607521..c11e059 100644 --- a/kis/connector.go +++ b/kis/connector.go @@ -2,6 +2,7 @@ package kis import ( "context" + "github.com/aceld/kis-flow/config" ) diff --git a/serialize/serialize_default.go b/serialize/serialize_default.go index de766ea..c855ca8 100644 --- a/serialize/serialize_default.go +++ b/serialize/serialize_default.go @@ -12,8 +12,9 @@ package serialize import ( "encoding/json" "fmt" - "github.com/aceld/kis-flow/common" "reflect" + + "github.com/aceld/kis-flow/common" ) type DefaultSerialize struct{}