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: config.go
    path of file: ./repos/stolon/cmd/stolonctl/cmd/register
    
    the code of the file until where you have to start completion: // Copyright 2019 Sorint.lab
//
// Licensed under the Apache Licen
    
func (config *Config) Validate() error {
	switch config.Backend {
	case "consul":
		addresses := strings.Split(config.Endpoints, ",")
		if len(addresses) != 1 {
			return fmt.Errorf("consul does not support multiple endpoints: %s", config.Endpoints)
		}
		_, err := url.Parse(config.Endpoints)
		return err
	default:
		return fmt.Errorf("unknown register backend: %q", config.Backend)
	}
}