etcdutl: address var-naming lint warnings

Signed-off-by: Ivan Valdes <ivan@vald.es>
This commit is contained in:
Ivan Valdes 2024-04-23 20:08:40 -07:00
parent c2a3ca62c7
commit bc3f109572
No known key found for this signature in database
GPG Key ID: 4037D37741ED0CC5

View File

@ -35,7 +35,7 @@ var (
restoreCluster string
restoreClusterToken string
restoreDataDir string
restoreWalDir string
restoreWALDir string
restorePeerURLs string
restoreName string
skipHashCheck bool
@ -73,7 +73,7 @@ func NewSnapshotRestoreCommand() *cobra.Command {
Run: snapshotRestoreCommandFunc,
}
cmd.Flags().StringVar(&restoreDataDir, "data-dir", "", "Path to the output data directory")
cmd.Flags().StringVar(&restoreWalDir, "wal-dir", "", "Path to the WAL directory (use --data-dir if none given)")
cmd.Flags().StringVar(&restoreWALDir, "wal-dir", "", "Path to the WAL directory (use --data-dir if none given)")
cmd.Flags().StringVar(&restoreCluster, "initial-cluster", initialClusterFromName(defaultName), "Initial cluster configuration for restore bootstrap")
cmd.Flags().StringVar(&restoreClusterToken, "initial-cluster-token", "etcd-cluster", "Initial cluster token for the etcd cluster during restore bootstrap")
cmd.Flags().StringVar(&restorePeerURLs, "initial-advertise-peer-urls", defaultInitialAdvertisePeerURLs, "List of this member's peer URLs to advertise to the rest of the cluster")
@ -106,14 +106,14 @@ func SnapshotStatusCommandFunc(cmd *cobra.Command, args []string) {
}
func snapshotRestoreCommandFunc(_ *cobra.Command, args []string) {
SnapshotRestoreCommandFunc(restoreCluster, restoreClusterToken, restoreDataDir, restoreWalDir,
SnapshotRestoreCommandFunc(restoreCluster, restoreClusterToken, restoreDataDir, restoreWALDir,
restorePeerURLs, restoreName, skipHashCheck, initialMmapSize, revisionBump, markCompacted, args)
}
func SnapshotRestoreCommandFunc(restoreCluster string,
restoreClusterToken string,
restoreDataDir string,
restoreWalDir string,
restoreWALDir string,
restorePeerURLs string,
restoreName string,
skipHashCheck bool,
@ -136,7 +136,7 @@ func SnapshotRestoreCommandFunc(restoreCluster string,
dataDir = restoreName + ".etcd"
}
walDir := restoreWalDir
walDir := restoreWALDir
if walDir == "" {
walDir = datadir.ToWALDir(dataDir)
}