output

package
v0.0.0-...-ad42bc2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxContentLines = 50
	SnipMark        = "----- cut at 50 entries -----"
)

Variables

View Source
var (
	DidSnip            bool
	DidAvoidEmptyBlock bool
)

Functions

func Finalize

func Finalize()

Called at the very end, before terminating pancap

func PrintBlock

func PrintBlock(headline string, content string)

Prints a block of information with the given headline If content is empty, printing the headline is omitted. If the content is longer than MaxContentLines, content is cut.

func PrintSummary

func PrintSummary()

Prints a brief summary about the extracted files

func RegisterFile

func RegisterFile(filename string, content []byte, origin string)

Registers a file with the given name and content. This function takes care of filesystem I/O handling and flag parsing. This means that a module should _always_ call this function when a file is encountered. origin is a descriptive string where the file comes from, e.g. the module name.

func RegisterFlags

func RegisterFlags()

func StoreFiles

func StoreFiles()

Iterates over all registered files and checks if they should be extracted and stored, and does exactly that.

Types

type File

type File struct {
	// contains filtered or unexported fields
}

func NewFile

func NewFile(name string, content []byte, origin string) File

Creates a new file object and calculates the hash of the given content

Jump to

Keyboard shortcuts

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