format

package
v3.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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