From f99d151ce1c4e7f78cc9e39bfca19c09059d7e91 Mon Sep 17 00:00:00 2001 From: okaybase Date: Fri, 13 Aug 2021 09:09:15 +0800 Subject: [PATCH] add redis-cluster policy tips for limit-count --- api/internal/core/migrate/dataset.go | 8 ++++---- api/test/e2enew/migrate/migrate_test.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/internal/core/migrate/dataset.go b/api/internal/core/migrate/dataset.go index d09edd8965..c1d756e8f5 100644 --- a/api/internal/core/migrate/dataset.go +++ b/api/internal/core/migrate/dataset.go @@ -25,7 +25,7 @@ import ( ) type DataSet struct { - Consumers []*entity.Consumer + Counsumers []*entity.Consumer Routes []*entity.Route Services []*entity.Service SSLs []*entity.SSL @@ -37,7 +37,7 @@ type DataSet struct { func newDataSet() *DataSet { return &DataSet{ - Consumers: make([]*entity.Consumer, 0), + Counsumers: make([]*entity.Consumer, 0), Routes: make([]*entity.Route, 0), Services: make([]*entity.Service, 0), SSLs: make([]*entity.SSL, 0), @@ -51,7 +51,7 @@ func newDataSet() *DataSet { func (a *DataSet) rangeData(key store.HubKey, f func(int, interface{}) bool) { switch key { case store.HubKeyConsumer: - for i, v := range a.Consumers { + for i, v := range a.Counsumers { if !f(i, v) { break } @@ -105,7 +105,7 @@ func (a *DataSet) Add(obj interface{}) error { var err error = nil switch obj := obj.(type) { case *entity.Consumer: - a.Consumers = append(a.Consumers, obj) + a.Counsumers = append(a.Counsumers, obj) case *entity.Route: a.Routes = append(a.Routes, obj) case *entity.Service: diff --git a/api/test/e2enew/migrate/migrate_test.go b/api/test/e2enew/migrate/migrate_test.go index a72d26450a..27421e8c26 100644 --- a/api/test/e2enew/migrate/migrate_test.go +++ b/api/test/e2enew/migrate/migrate_test.go @@ -35,7 +35,7 @@ const ( ) type AllData struct { - Consumers []interface{} + Counsumers []interface{} Routes []interface{} Services []interface{} SSLs []interface{}