Documentation
¶
Overview ¶
Package output renders acurl reports in human and machine formats.
Index ¶
- Constants
- Variables
- func ExitCode(s types.Summary) int
- func FormatSize(n int) string
- func Write(w io.Writer, format string, result types.ComparisonResult, color bool) error
- func WriteDiff(w io.Writer, baseName, otherName string, lines []textdiff.Line, color bool) error
- func WriteJSON(w io.Writer, result types.ComparisonResult) error
- func WriteMarkdown(w io.Writer, result types.ComparisonResult) error
- func WriteRobotsAudit(w io.Writer, format string, a types.RobotsAudit, color bool) error
- func WriteTable(w io.Writer, result types.ComparisonResult, color bool) error
Constants ¶
View Source
const ( ExitOK = 0 // every profile was allowed ExitBlocked = 1 // at least one profile was blocked or challenged ExitError = 2 // a request failed, or acurl itself failed )
Exit codes returned by acurl.
View Source
const Caveat = "acurl sends agent user-agent strings from your own IP address. Real AI agents " +
"come from published IP ranges and may sign their requests, so these results show how a " +
"site responds to user-agent strings, not guaranteed agent access."
Caveat explains what acurl results do and do not prove.
Variables ¶
View Source
var Formats = []string{"table", "json", "markdown"}
Formats lists the supported output formats.
Functions ¶
func WriteDiff ¶ added in v0.2.0
WriteDiff prints a line diff of the visible text two profiles received.
func WriteJSON ¶
func WriteJSON(w io.Writer, result types.ComparisonResult) error
WriteJSON renders result as indented JSON.
func WriteMarkdown ¶
func WriteMarkdown(w io.Writer, result types.ComparisonResult) error
WriteMarkdown renders result as a GitHub-flavored Markdown report.
func WriteRobotsAudit ¶ added in v0.2.0
WriteRobotsAudit renders a robots.txt audit as a table or JSON.
func WriteTable ¶
WriteTable renders result as a terminal table.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.