зеркало из https://github.com/github/vitess-gh.git
Fixed golint error
This commit is contained in:
Родитель
20fe27710d
Коммит
e85f12ed87
|
@ -36,9 +36,9 @@ type heatmap struct {
|
||||||
|
|
||||||
type byTabletUID []*discovery.TabletStats
|
type byTabletUID []*discovery.TabletStats
|
||||||
|
|
||||||
func (a byTabletUid) Len() int { return len(a) }
|
func (a byTabletUID) Len() int { return len(a) }
|
||||||
func (a byTabletUid) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
|
func (a byTabletUID) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
|
||||||
func (a byTabletUid) Less(i, j int) bool { return a[i].Tablet.Alias.Uid < a[j].Tablet.Alias.Uid }
|
func (a byTabletUID) Less(i, j int) bool { return a[i].Tablet.Alias.Uid < a[j].Tablet.Alias.Uid }
|
||||||
|
|
||||||
const tabletMissing = -1
|
const tabletMissing = -1
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ func (c *tabletStatsCache) StatsUpdate(stats *discovery.TabletStats) {
|
||||||
}
|
}
|
||||||
|
|
||||||
c.statuses[keyspace][shard][cell][tabletType] = append(c.statuses[keyspace][shard][cell][tabletType], stats)
|
c.statuses[keyspace][shard][cell][tabletType] = append(c.statuses[keyspace][shard][cell][tabletType], stats)
|
||||||
sort.Sort(byTabletUid(c.statuses[keyspace][shard][cell][tabletType]))
|
sort.Sort(byTabletUID(c.statuses[keyspace][shard][cell][tabletType]))
|
||||||
c.statusesByAlias[aliasKey] = stats
|
c.statusesByAlias[aliasKey] = stats
|
||||||
c.tabletCountsByCell[cell]++
|
c.tabletCountsByCell[cell]++
|
||||||
return
|
return
|
||||||
|
|
Загрузка…
Ссылка в новой задаче