testutil

package
v0.0.0-...-bd0de90 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: MPL-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const GreetingFileContents = "hello, world\n"

Variables

This section is empty.

Functions

func CreateDummyTorrentData

func CreateDummyTorrentData(dirName string) string

func CreateMetaInfo

func CreateMetaInfo(name string, w io.Writer)

Writes to w, a metainfo containing the file at name.

func ExportStatusWriter

func ExportStatusWriter(sw StatusWriter, path string)

func GreetingTestTorrent

func GreetingTestTorrent() (tempDir string, metaInfo *metainfo.MetaInfo)

Gives a temporary directory containing the completed "greeting" torrent, and a corresponding metainfo describing it. The temporary directory can be cleaned away with os.RemoveAll.

Types

type StatusWriter

type StatusWriter interface {
	WriteStatus(io.Writer)
}

Jump to

Keyboard shortcuts

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