You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: dialer.go
    path of file: ./repos/erda/pkg/clusterdialer
    
    the code of the file until where you have to start completion: // Copyright (c) 2021 Terminus, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apac
    
func queryClusterManagerIP(clusterKey interface{}) (interface{}, bool) {
	log := logrus.WithField("func", "DialContext")
	log.Debugf("start querying clusterManager IP in dialContext...")

	splits := strings.Split(discover.ClusterDialer(), ":")
	if len(splits) != 2 {
		log.Errorf("invalid clusterManager addr: %s", discover.ClusterDialer())
		return "", false
	}
	addr := splits[0]
	port := splits[1]
	host := fmt.Sprintf("http://%s:%s", addr, port)
	resp, err := http.Get(host + fmt.Sprintf("/clusterdialer/ip?clusterKey=%s", clusterKey))
	if err != nil {
		log.Errorf("failed to request clusterManager in cache updating in dialContext, %v", err)
		return "", false
	}

	data, err := io.ReadAll(resp.Body)
	if err != nil {
		log.Errorf("failed to read from resp in cache updating, %v", err)
		return "", false
	}
	r := make(map[string]interface{})
	if err = json.Unmarshal(data, &r); err != nil {
		log.Errorf("failed to unmarshal resp in cache updating, %v", err)
		return "", false
	}

	succeeded, _ := r["succeeded"].(bool)
	if !succeeded {
		errStr, _ := r["error"].(string)
		log.Errorf("return error from clusterManager in cache updating, %s", errStr)
		return "", false
	}

	ip, _ := r["IP"].(string)
	return fmt.Sprintf("%s:%s", ip, port), true
}