Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for IsTerminal (0.15 sec)

  1. internal/color/color.go

    	// ansi coloring on dumb terminals.
    	IsTerminal = func() bool {
    		return !color.NoColor
    	}
    
    	Bold = func() func(format string, a ...interface{}) string {
    		if IsTerminal() {
    			return color.New(color.Bold).SprintfFunc()
    		}
    		return fmt.Sprintf
    	}()
    
    	RedBold = func() func(a ...interface{}) string {
    		if IsTerminal() {
    			return color.New(color.FgRed, color.Bold).SprintFunc()
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 17:57:52 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  2. cmd/server-startup-msg.go

    	apiEndpointStr := strings.TrimSpace(strings.Join(apiEndpoints, "  "))
    	// Colorize the message and print.
    	logger.Info(color.Blue("API: ") + color.Bold(fmt.Sprintf("%s ", apiEndpointStr)))
    	if color.IsTerminal() && (!globalServerCtxt.Anonymous && !globalServerCtxt.JSON && globalAPIConfig.permitRootAccess()) {
    		logger.Info(color.Blue("   RootUser: ") + color.Bold("%s ", cred.AccessKey))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Mar 09 03:07:08 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  3. cmd/common-main.go

    	serverDebugLog     = env.Get("_MINIO_SERVER_DEBUG", config.EnableOff) == config.EnableOn
    	currentReleaseTime time.Time
    	orchestrated       = IsKubernetes() || IsDocker()
    )
    
    func init() {
    	if !term.IsTerminal(int(os.Stdout.Fd())) || !term.IsTerminal(int(os.Stderr.Fd())) {
    		color.TurnOff()
    	}
    	if env.Get("NO_COLOR", "") != "" || env.Get("TERM", "") == "dumb" {
    		color.TurnOff()
    	}
    
    	if runtime.GOOS == "windows" {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat May 04 00:17:57 GMT 2024
    - 35.8K bytes
    - Viewed (2)
  4. istioctl/pkg/analyze/analyze.go

    	var readers []local.ReaderSource
    	for _, f := range args {
    		var r *os.File
    
    		// Handle "-" as stdin as a special case.
    		if f == "-" {
    			if isatty.IsTerminal(os.Stdin.Fd()) && !isJSONorYAMLOutputFormat() {
    				fmt.Fprint(cmd.OutOrStdout(), "Reading from stdin:\n")
    			}
    			r = os.Stdin
    			readers = append(readers, local.ReaderSource{Name: f, Reader: r})
    			continue
    		}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Apr 02 08:32:06 GMT 2024
    - 17K bytes
    - Viewed (0)
Back to top