google

package
v0.0.0-...-a07c284 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Web   = FakeSearch("web", "The Go Programming Language", "http://golang.org")
	Image = FakeSearch("image", "The Go gopher", "https://blog.golang.org/gopher/gopher.png")
	Video = FakeSearch("video", "Concurrency is not Parallelism", "https://www.youtube.com/watch?v=cN_DpYBzKso")
)

START2 OMIT

View Source
var (
	Web1   = FakeSearch("web1", "The Go Programming Language", "http://golang.org")
	Web2   = FakeSearch("web2", "The Go Programming Language", "http://golang.org")
	Image1 = FakeSearch("image1", "The Go gopher", "https://blog.golang.org/gopher/gopher.png")
	Image2 = FakeSearch("image2", "The Go gopher", "https://blog.golang.org/gopher/gopher.png")
	Video1 = FakeSearch("video1", "Concurrency is not Parallelism",
		"https://www.youtube.com/watch?v=cN_DpYBzKso")
	Video2 = FakeSearch("video2", "Concurrency is not Parallelism",
		"https://www.youtube.com/watch?v=cN_DpYBzKso")
)

Functions

This section is empty.

Types

type Result

type Result struct {
	Title, URL string
}

START1 OMIT

func Search(query string) ([]Result, error)

func SearchParallel

func SearchParallel(query string) ([]Result, error)

func SearchReplicated

func SearchReplicated(query string, timeout time.Duration) ([]Result, error)

func SearchTimeout

func SearchTimeout(query string, timeout time.Duration) ([]Result, error)

func (Result) String

func (r Result) String() string

String returns the result's title, followed by a newline.

type SearchFunc

type SearchFunc func(query string) Result // HL

func FakeSearch

func FakeSearch(kind, title, url string) SearchFunc

func First

func First(replicas ...SearchFunc) SearchFunc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL