server

command
v0.0.0-...-2824937 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: MIT, BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

The server program issues Google search requests and demonstrates the use of the go.net Context API. It serves on port 8080.

The /search endpoint accepts these query params:

q=the Google search query
timeout=a timeout for the request, in time.Duration format

For example, http://localhost:8080/search?q=golang&timeout=1s serves the first few Google search results for "golang" or a "deadline exceeded" error if the timeout expires.

Jump to

Keyboard shortcuts

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