blog: golang.org/x/blog/content/context/google Index | Files

package google

import "golang.org/x/blog/content/context/google"

Package google provides a function to do Google searches using the Google Web Search API. See https://developers.google.com/web-search/docs/

This package is an example to accompany https://blog.golang.org/context. It is not intended for use by others.

Google has since disabled its search API, and so this package is no longer useful.

Index

Package Files

google.go

type Result Uses

type Result struct {
    Title, URL string
}

A Result contains the title and URL of a search result.

type Results Uses

type Results []Result

Results is an ordered list of search results.

func Search(ctx context.Context, query string) (Results, error)

Search sends query to Google search and returns the results.

Package google imports 4 packages (graph) and is imported by 1 packages. Updated 2017-10-20. Refresh now. Tools for package owners.