rtk

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 8 Imported by: 1 module, 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 GlobalEngine = NewEngine()

Functions

This section is empty.

Types

type Engine

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

func NewEngine

func NewEngine() *Engine

func (*Engine) FilterCommandOutput

func (e *Engine) FilterCommandOutput(command, output string) FilterResult

FilterCommandOutput checks if text matches any command filter and optimizes it

func (*Engine) ListFilters

func (e *Engine) ListFilters() []map[string]interface{}

type FilterResult

type FilterResult struct {
	OriginalLines   int      `json:"original_lines"`
	FilteredLines   int      `json:"filtered_lines"`
	LinesSaved      int      `json:"lines_saved"`
	PercentSaved    float64  `json:"percent_saved"`
	MatchedFilterID string   `json:"matched_filter_id,omitempty"`
	Output          string   `json:"output"`
	Techniques      []string `json:"techniques"`
}

type FilterRule

type FilterRule struct {
	ID          string `json:"id"`
	Label       string `json:"label"`
	Description string `json:"description"`
	Category    string `json:"category"`
	Priority    int    `json:"priority"`
	Match       struct {
		Commands []string `json:"commands"`
		Patterns []string `json:"patterns"`
	} `json:"match"`
	Rules struct {
		IncludePatterns []string `json:"includePatterns"`
		DropPatterns    []string `json:"dropPatterns"`
		MaxLines        int      `json:"maxLines"`
		HeadLines       int      `json:"headLines"`
		TailLines       int      `json:"tailLines"`
	} `json:"rules"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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