From 71d84d5479a006cf4ea97d99a32be31d1642eb18 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Fri, 13 Dec 2024 00:52:02 +0100 Subject: [PATCH] simplify Signed-off-by: Tim Vaillancourt --- go/vt/vtorc/logic/tablet_discovery.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/go/vt/vtorc/logic/tablet_discovery.go b/go/vt/vtorc/logic/tablet_discovery.go index 08b3b9cc7a2..2a9103c0ae9 100644 --- a/go/vt/vtorc/logic/tablet_discovery.go +++ b/go/vt/vtorc/logic/tablet_discovery.go @@ -67,17 +67,15 @@ func parseClustersToWatch() { } shardsToWatch[ks] = true } else { - // Remove trailing slash, if exists - if strings.HasSuffix(ks, "/") { - ks = strings.TrimSuffix(ks, "/") - } + // Remove trailing slash, if exists. + ks = strings.TrimSuffix(ks, "/") // Assume this is a keyspace and find all shards in keyspace. ctx, cancel := context.WithTimeout(context.Background(), topo.RemoteOperationTimeout) defer cancel() shards, err := ts.GetShardNames(ctx, ks) if err != nil { - // Log the errr and continue + // Log the err and continue. log.Errorf("Error fetching shards for keyspace: %v", ks) continue }