cmdcat

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 17 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

This section is empty.

Functions

func NewCommand

func NewCommand(ctx context.Context, name string) *cobra.Command

Types

type CatRunner

type CatRunner struct {
	Command            *cobra.Command
	Ctx                context.Context
	Format             bool
	KeepAnnotations    bool
	Styles             []string
	StripComments      bool
	RecurseSubPackages bool
}

CatRunner contains the run function

func GetCatRunner

func GetCatRunner(ctx context.Context, _ string) *CatRunner

GetCatRunner returns a command CatRunner.

func (*CatRunner) ExecuteCmd

func (r *CatRunner) ExecuteCmd(w io.Writer, pkgPath string) error

ExecuteCmd outputs the contents of a single package at pkgPath. It intentionally does NOT recurse into nested subpackages (directories containing a Kptfile). Subpackage recursion is handled by the caller (runner.ExecuteCmdOnPkgs) which invokes ExecuteCmd once per package when RecurseSubPackages is set. Callers invoking ExecuteCmd directly will only see the top-level package content; use ExecuteCmdOnPkgs for recursive traversal.

Jump to

Keyboard shortcuts

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