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: aggregations-bucket-datehistogram-aggregation_25429a303a53d06fd0151f3618013ee4_test.go
    path of file: ./repos/go-elasticsearch/.doc/examples/src
    
    the code of the file until where you have to start completion: // Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you 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.apache.org/licenses/LICENSE-2.0
//
// Un
    
func Test_aggregations_bucket_datehistogram_aggregation_25429a303a53d06fd0151f3618013ee4(t *testing.T) {
	es, _ := elasticsearch.NewDefaultClient()

	// tag:25429a303a53d06fd0151f3618013ee4[]
	res, err := es.Search(
		es.Search.WithIndex("sales"),
		es.Search.WithBody(strings.NewReader(`{
		  "aggs": {
		    "dayOfWeek": {
		      "terms": {
		        "script": {
		          "lang": "painless",
		          "source": "doc['date'].value.dayOfWeekEnum.value"
		        }
		      }
		    }
		  }
		}`)),
		es.Search.WithSize(0),
		es.Search.WithPretty(),
	)
	fmt.Println(res, err)
	if err != nil { // SKIP
		t.Fatalf("Error getting the response: %s", err) // SKIP
	} // SKIP
	defer res.Body.Close() // SKIP
	// end:25429a303a53d06fd0151f3618013ee4[]
}