cmd

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 5 Imported by: 53

Documentation

Overview

Package cmd provides helpers used by kind's commands / cli

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorEnabled

func ColorEnabled(logger log.Logger) bool

ColorEnabled returns true if color is enabled for the logger this should be used to control output

func NewLogger

func NewLogger() log.Logger

NewLogger returns the standard logger used by the kind CLI This logger writes to os.Stderr

Types

type IOStreams

type IOStreams struct {
	// In think, os.Stdin
	In io.Reader
	// Out think, os.Stdout
	Out io.Writer
	// ErrOut think, os.Stderr
	ErrOut io.Writer
}

IOStreams provides the standard names for iostreams. This is useful for embedding and for unit testing. Inconsistent and different names make it hard to read and review code This is based on cli-runtime, but just the nice type without the dependency

func StandardIOStreams

func StandardIOStreams() IOStreams

StandardIOStreams returns an IOStreams from os.Stdin, os.Stdout

Directories

Path Synopsis
Package kind implements the root kind cobra command, and the cli Main()
Package kind implements the root kind cobra command, and the cli Main()
build
Package build implements the `build` command
Package build implements the `build` command
completion
Package completion implements the `completion` command
Package completion implements the `completion` command
completion/bash
Package bash implements the `bash` command
Package bash implements the `bash` command
completion/fish
Package fish implements the `fish` command
Package fish implements the `fish` command
completion/powershell
Package powershell implements the `powershell` command
Package powershell implements the `powershell` command
completion/zsh
Package zsh implements the `zsh` command
Package zsh implements the `zsh` command
create
Package create implements the `create` command
Package create implements the `create` command
create/cluster
Package cluster implements the `create cluster` command
Package cluster implements the `create cluster` command
delete
Package delete implements the `delete` command
Package delete implements the `delete` command
delete/cluster
Package cluster implements the `delete` command
Package cluster implements the `delete` command
delete/clusters
Package clusters implements the `delete` command for multiple clusters
Package clusters implements the `delete` command for multiple clusters
export
Package export implements the `export` command
Package export implements the `export` command
export/kubeconfig
Package kubeconfig implements the `kubeconfig` command
Package kubeconfig implements the `kubeconfig` command
export/logs
Package logs implements the `logs` command
Package logs implements the `logs` command
get
Package get implements the `get` command
Package get implements the `get` command
get/clusters
Package clusters implements the `clusters` command
Package clusters implements the `clusters` command
get/kubeconfig
Package kubeconfig implements the `kubeconfig` command
Package kubeconfig implements the `kubeconfig` command
get/nodes
Package nodes implements the `nodes` command
Package nodes implements the `nodes` command
load
Package load implements the `load` command
Package load implements the `load` command
load/docker-image
Package load implements the `load` command
Package load implements the `load` command
load/image-archive
Package load implements the `load` command
Package load implements the `load` command
version
Package version implements the `version` command
Package version implements the `version` command

Jump to

Keyboard shortcuts

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