simplehandler

package
v0.0.0-...-3fff119 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2015 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package simplehandler provides a basic walker handler implementation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct{}

Handler implements an object that conforms to walker.Handler interface.

func (*Handler) HandleResponse

func (h *Handler) HandleResponse(fr *walker.FetchResults)

HandleResponse just writes returned pages as files locally, naming the file after the URL of the request made.

For example, when handling the response for `http://test.com/amazing/stuff.html`, it will create the directory `$PWD/test.com/amazing` and write the page contents (no headers or HTTP data) to `$PWD/test.com/amazing/stuff.html`

It skips pages that do not have a 2XX HTTP code.

Jump to

Keyboard shortcuts

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