examples: temporarily comment out test
The next generation refactors this list method to under Cse instead
of under Siterestrict. Because go test ./... is run after generation
the process is failing as because of this refactor. I will update
this example after the next regen come through.
Change-Id: I99422050bd0267968aafbf55bab16ed9f7653174
Reviewed-on: https://code-review.googlesource.com/c/google-api-go-client/+/54550
Reviewed-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chris Broadfoot <cbro@google.com>
diff --git a/examples/customsearch.go b/examples/customsearch.go
index 5495e36..8768712 100644
--- a/examples/customsearch.go
+++ b/examples/customsearch.go
@@ -4,36 +4,28 @@
package main
-import (
- "fmt"
- "log"
- "net/http"
-
- customsearch "google.golang.org/api/customsearch/v1"
- "google.golang.org/api/googleapi/transport"
-)
-
const (
apiKey = "some-api-key"
cx = "some-custom-search-engine-id"
query = "some-custom-query"
)
+// TODO(codyoss): uncomment and refactor after generation.
func customSearchMain() {
- client := &http.Client{Transport: &transport.APIKey{Key: apiKey}}
-
- svc, err := customsearch.New(client)
- if err != nil {
- log.Fatal(err)
- }
-
- resp, err := svc.Cse.Siterestrict.List(query).Cx(cx).Do()
- if err != nil {
- log.Fatal(err)
- }
-
- for i, result := range resp.Items {
- fmt.Printf("#%d: %s\n", i+1, result.Title)
- fmt.Printf("\t%s\n", result.Snippet)
- }
+ // client := &http.Client{Transport: &transport.APIKey{Key: apiKey}}
+ //
+ // svc, err := customsearch.New(client)
+ // if err != nil {
+ // log.Fatal(err)
+ // }
+ //
+ // resp, err := svc.Cse.Siterestrict.List(query).Cx(cx).Do()
+ // if err != nil {
+ // log.Fatal(err)
+ // }
+ //
+ // for i, result := range resp.Items {
+ // fmt.Printf("#%d: %s\n", i+1, result.Title)
+ // fmt.Printf("\t%s\n", result.Snippet)
+ // }
}