goimprts sort

This commit is contained in:
aceld 2024-04-16 14:54:11 +08:00
parent 75dde9ad96
commit 540fd35355
3 changed files with 4 additions and 3 deletions

View File

@ -11,7 +11,6 @@ import (
"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/aceld/kis-flow/metrics" "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 // 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) { func (flow *KisFlow) SetCacheData(key string, value interface{}, Exp time.Duration) {
if Exp == common.DefaultExpiration { if Exp == common.DefaultExpiration {
flow.cache.Set(key, value, cache.DefaultExpiration) flow.cache.Set(key, value, 0)
} else { } else {
flow.cache.Set(key, value, Exp) flow.cache.Set(key, value, Exp)
} }

View File

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

View File

@ -12,8 +12,9 @@ package serialize
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/aceld/kis-flow/common"
"reflect" "reflect"
"github.com/aceld/kis-flow/common"
) )
type DefaultSerialize struct{} type DefaultSerialize struct{}