Documentation ¶
Overview ¶
Shared helpers across commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // This works so long as the current dir structure stays the same. // This should be the base of the project e.g. '/home/user1/kiali'. // If the location of this file changes, this needs to be updated as well. KialiProjectRoot = path.Dir(path.Dir(basepath)) )
Functions ¶
func ConfigureKialiLogger ¶
func ConfigureKialiLogger()
func GetKubeConfig ¶
GetKubeConfig constructs a kube config from either the user's local kube config or the KUBECONFIG env var.
func Usage ¶
Usage creates a custom usage function that allows you to specify position arguments and prints flags with two dashes instead of one e.g. '--url' instead of '-url'.
You can assign this to flag.Usage directly or any other FlagSet.Usage e.g. 'flag.Usage = Usage(requiredFlag1)'.
The resulting Usage will look like: Usage: cmd <pos-arg1> <pos-arg2> ... [Options]
Options: --opt1 string opt description (default "") ...
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.