Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for IstioctlColorDefault (0.19 sec)

  1. istioctl/pkg/util/formatting/formatter.go

    	if !ok {
    		return ""
    	}
    	return prefix
    }
    
    func colorSuffix(colorize bool) string {
    	if !colorize {
    		return ""
    	}
    	return "\033[0m"
    }
    
    func IstioctlColorDefault(writer io.Writer) bool {
    	if strings.EqualFold(termEnvVar.Get(), "dumb") {
    		return false
    	}
    
    	file, ok := writer.(*os.File)
    	if ok {
    		if !isatty.IsTerminal(file.Fd()) {
    			return false
    		}
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Tue Jul 11 02:41:45 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  2. istioctl/pkg/analyze/analyze.go

    		"Use live Kubernetes cluster for analysis. Set --use-kube=false to analyze files only.")
    	analysisCmd.PersistentFlags().BoolVar(&colorize, "color", formatting.IstioctlColorDefault(analysisCmd.OutOrStdout()),
    		"Default true.  Disable with '=false' or set $TERM to dumb")
    	analysisCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false,
    		"Enable verbose output")
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Oct 31 06:53:50 UTC 2024
    - 17.6K bytes
    - Viewed (0)
Back to top