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: interfaces.go
    path of file: ./repos/cadence/host/esutils
    
    the code of the file until where you have to start completion: // Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a cop
    
func CreateESClient(t *testing.T, url string, version string) ESClient {
	var client ESClient
	var err error
	switch version {
	case "v6":
		client, err = newV6Client(url)
	case "v7":
		client, err = newV7Client(url)
	case "os2":
		client, err = newOS2Client(url)
	default:
		assert.FailNow(t, fmt.Sprintf("not supported ES version: %s", version))
	}
	assert.NoError(t, err)
	return client
}