cmd

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package cmd provide common implementations for commands

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeclareYAMLReplacerFlags

func DeclareYAMLReplacerFlags(cli *cobra.Command)

DeclareYAMLReplacerFlags declares the flags for the YAML replacer

func WithImageRegex

func WithImageRegex(regex string) func(*YAMLReplacer)

WithImageRegex sets the image regex

Types

type YAMLReplacer

type YAMLReplacer struct {
	cliutils.Replacer
	ImageRegex string
}

YAMLReplacer replaces container image references in YAML files

func NewYAMLReplacer

func NewYAMLReplacer(cli *cobra.Command, opts ...func(*YAMLReplacer)) (*YAMLReplacer, error)

NewYAMLReplacer creates a new YAMLReplacer from the given command-line arguments and options

func (*YAMLReplacer) Do

func (r *YAMLReplacer) Do(ctx context.Context, _ *config.Config) error

Do runs the YAMLReplacer

Jump to

Keyboard shortcuts

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