mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 10:04:18 +02:00
replace & with new()
This commit is contained in:
@@ -101,9 +101,7 @@ func getClusterStatus(conf *cfg.Config) (*apiResponse, error) {
|
||||
es := conf.DefaultCluster.ES()
|
||||
|
||||
responses := make(chan apiResponse, gocount)
|
||||
wg := &sync.WaitGroup{}
|
||||
|
||||
wg.Add(gocount)
|
||||
wg := new(sync.WaitGroup{})
|
||||
|
||||
wg.Go(func() {
|
||||
getApiData(conf, es, responses, "health")
|
||||
@@ -135,7 +133,7 @@ func getClusterStatus(conf *cfg.Config) (*apiResponse, error) {
|
||||
|
||||
wg.Wait()
|
||||
|
||||
all := apiResponse{}
|
||||
all := new(apiResponse{})
|
||||
|
||||
var err error
|
||||
|
||||
@@ -162,7 +160,7 @@ func getClusterStatus(conf *cfg.Config) (*apiResponse, error) {
|
||||
}
|
||||
}
|
||||
|
||||
return &all, err
|
||||
return all, err
|
||||
}
|
||||
|
||||
func ClusterStatus(conf *cfg.Config) error {
|
||||
|
||||
Reference in New Issue
Block a user