format

package
v3.2.7-fix1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ReportGenerationMetadataHooks are the hooks for adding metadata to the report
	ReportGenerationMetadataHooks []reportMetadataEditorHook
)

Functions

func CreateReportDescription

func CreateReportDescription(event *output.ResultEvent, formatter ResultFormatter, omitRaw bool) string

func CreateTemplateInfoTable

func CreateTemplateInfoTable(templateInfo *model.Info, formatter ResultFormatter) string

func GetMatchedTemplateName

func GetMatchedTemplateName(event *output.ResultEvent) string

GetMatchedTemplateName returns the matched template name from a result event together with the found matcher and extractor name, if present

func Summary

func Summary(event *output.ResultEvent) string

Summary returns a formatted built one line summary of the event

Types

type ResultFormatter

type ResultFormatter interface {
	MakeBold(text string) string
	CreateCodeBlock(title string, content string, language string) string
	CreateTable(headers []string, rows [][]string) (string, error)
	CreateLink(title string, url string) string
	CreateHorizontalLine() string
}

Jump to

Keyboard shortcuts

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