Skip to content

Commit 653a117

Browse files
committed
Fie merge configyrator
1 parent 3b83e35 commit 653a117

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

clients/client_configurator.go

+11-18
Original file line numberDiff line numberDiff line change
@@ -69,27 +69,22 @@ var configuratorCmd = &cobra.Command{
6969
RepMan.InitConfig(conf)
7070
go RepMan.Run()
7171
time.Sleep(2 * time.Second)
72-
<<<<<<< HEAD
73-
cluster:= RepMan.Clusters[RepMan.ClusterList[0]]
74-
if cluster == nil {
75-
=======
7672
cluster := RepMan.Clusters[RepMan.ClusterList[0]]
7773

7874
if cluster == nil {
79-
>>>>>>> Limit parameter scope to it's minimal naeed outside of the server class
8075
log.Fatalf("No Cluster found .replication-manager/config.toml")
81-
}
82-
for _ , s := range cluster.Servers {
83-
conn , err := s.GetNewDBConn()
84-
if err !=nil {
85-
log.WithError(err).Fatalf("Connecting error to database in .replication-manager/config.toml: %s", s.URL)
76+
}
77+
for _, s := range cluster.Servers {
78+
conn, err := s.GetNewDBConn()
79+
if err != nil {
80+
log.WithError(err).Fatalf("Connecting error to database in .replication-manager/config.toml: %s", s.URL)
8681
}
87-
variables, _, err := dbhelper.GetVariablesCase(conn, s.DBVersion,"LOWER")
88-
if err !=nil {
89-
log.WithError(err).Fatalf("Get variables failed %s", s.URL)
82+
variables, _, err := dbhelper.GetVariablesCase(conn, s.DBVersion, "LOWER")
83+
if err != nil {
84+
log.WithError(err).Fatalf("Get variables failed %s", s.URL)
9085
}
9186

92-
log.Infof("datadir %s", variables["DATADIR"])
87+
log.Infof("datadir %s", variables["DATADIR"])
9388
}
9489
RepMan.Clusters["mycluster"].WaitDatabaseCanConn()
9590
// var conf config.Config
@@ -409,12 +404,10 @@ var configuratorCmd = &cobra.Command{
409404
cliExit = true
410405
}
411406

412-
413-
414407
}
415408
switch event.Ch {
416-
// case 's':
417-
// termbox.Sync()
409+
// case 's':
410+
// termbox.Sync()
418411
default:
419412
}
420413
cliDisplayConfigurator(&cluster.Configurator)

0 commit comments

Comments
 (0)