kubernetes: k8s.io/kubernetes/pkg/kubectl/cmd/util/sanity Index | Files

package sanity

import "k8s.io/kubernetes/pkg/kubectl/cmd/util/sanity"

Index

Package Files

cmd_sanity.go

Variables

var (
    // AllCmdChecks is the list of CmdCheck type functions
    AllCmdChecks = []CmdCheck{
        CheckLongDesc,
        CheckExamples,
        CheckFlags,
    }

    // AllGlobalChecks is the list of GlobalCheck type functions
    AllGlobalChecks = []GlobalCheck{
        CheckGlobalVarFlags,
    }
)

func CheckExamples Uses

func CheckExamples(cmd *cobra.Command) []error

CheckExamples checks if the command examples are valid

func CheckFlags Uses

func CheckFlags(cmd *cobra.Command) []error

CheckFlags checks if the command-line flags are valid

func CheckGlobalVarFlags Uses

func CheckGlobalVarFlags() []error

CheckGlobalVarFlags checks if the global flags are valid

func CheckLongDesc Uses

func CheckLongDesc(cmd *cobra.Command) []error

CheckLongDesc checks if the long description is valid

func RunCmdChecks Uses

func RunCmdChecks(cmd *cobra.Command, cmdChecks []CmdCheck, skipCmd []string) []error

RunCmdChecks runs all the CmdCheck functions passed, skipping skippable commands and looks for error

func RunGlobalChecks Uses

func RunGlobalChecks(globalChecks []GlobalCheck) []error

RunGlobalChecks runs all the GlobalCheck functions passed and checks for error

type CmdCheck Uses

type CmdCheck func(cmd *cobra.Command) []error

CmdCheck is the commom type of functions to check cobra commands

type GlobalCheck Uses

type GlobalCheck func() []error

GlobalCheck is the common type of functions to check global flags

Package sanity imports 7 packages (graph) and is imported by 7 packages. Updated 2019-07-17. Refresh now. Tools for package owners.