flatdump

package
v0.0.0-...-cd6b1fc Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteFlatDumpHeader

func WriteFlatDumpHeader(w io.Writer, url gopher.URL, at time.Time) (n int, err error)

Types

type FlatDump

type FlatDump struct {
	At  time.Time
	URL gopher.URL
	io.Reader
}

FlatDump is a brutally simple way of dumping a Gopher request that I've used for some tests here and there and from bash.

Format:

FUR-DUMP <iso8601dt> <url>
<response>...

To dump from bash (wrecking all trailing newlines in the process):

	url=...
	out=...
 echo -en "FUR-DUMP $( date -Is ) $url\n$out"

func ReadFlatDump

func ReadFlatDump(rdr io.Reader) (*FlatDump, error)

Jump to

Keyboard shortcuts

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