cmdutil

package
v1.0.0-beta.59 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: Apache-2.0 Imports: 13 Imported by: 0 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

View Source
const (
	StackTraceOnErrors = "COBRA_STACK_TRACE_ON_ERRORS"

	Stdout              = "stdout"
	Unwrap              = "unwrap"
	FunctionsCatalogURL = "https://catalog.kpt.dev/catalog-v2.json"
)

Variables

View Source
var StackOnError bool

StackOnError if true, will print a stack trace on failure.

Functions

func CheckDirectoryNotPresent

func CheckDirectoryNotPresent(outDir string) error

CheckDirectoryNotPresent returns error if the directory already exists

func DiscoverFunctions

func DiscoverFunctions(cmd *cobra.Command) []v1alpha1.Function

func FixDocs

func FixDocs(oldVal, newVal string, c *cobra.Command)

FixDocs replaces instances of old with new in the docs for c

func GetKeywordsFromFlag

func GetKeywordsFromFlag(cmd *cobra.Command) []string

func PrintErrorStacktrace

func PrintErrorStacktrace() bool

func SuggestFunctions

func SuggestFunctions(cmd *cobra.Command) []string

SuggestFunctions looks for functions from kpt curated catalog list as well as the Porch orchestrator to suggest functions.

func SuggestKeywords

func SuggestKeywords(cmd *cobra.Command) []string

SuggestKeywords looks for all the unique keywords from Porch functions. This keywords can later help users to select functions.

func WriteFnOutput

func WriteFnOutput(dest, content string, fromStdin bool, w io.Writer) error

WriteFnOutput writes the output resources of function commands to provided destination

func WriteToOutput

func WriteToOutput(r io.Reader, w io.Writer, outDir string) error

WriteToOutput reads the input from r and writes the output to either w or outDir

Types

This section is empty.

Jump to

Keyboard shortcuts

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