From b4a18e17cb85ece6aea04fbcb14537551847d313 Mon Sep 17 00:00:00 2001 From: okaybase Date: Wed, 11 Aug 2021 15:39:27 +0800 Subject: [PATCH] typos --- 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 c1d756e8f5..d09edd8965 100644 --- a/api/internal/core/migrate/dataset.go +++ b/api/internal/core/migrate/dataset.go @@ -25,7 +25,7 @@ import ( ) type DataSet struct { - Counsumers []*entity.Consumer + Consumers []*entity.Consumer Routes []*entity.Route Services []*entity.Service SSLs []*entity.SSL @@ -37,7 +37,7 @@ type DataSet struct { func newDataSet() *DataSet { return &DataSet{ - Counsumers: make([]*entity.Consumer, 0), + Consumers: 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.Counsumers { + for i, v := range a.Consumers { 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.Counsumers = append(a.Counsumers, obj) + a.Consumers = append(a.Consumers, 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 27421e8c26..a72d26450a 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 { - Counsumers []interface{} + Consumers []interface{} Routes []interface{} Services []interface{} SSLs []interface{}