Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ansiMoveRight (0.12 sec)

  1. internal/logger/utils.go

    var ansiRE = regexp.MustCompile("(\x1b[^m]*m)")
    
    // Print ANSI Control escape
    func ansiEscape(format string, args ...interface{}) {
    	Esc := "\x1b"
    	fmt.Printf("%s%s", Esc, fmt.Sprintf(format, args...))
    }
    
    func ansiMoveRight(n int) {
    	if runtime.GOOS == "windows" {
    		return
    	}
    	if color.IsTerminal() {
    		ansiEscape("[%dC", n)
    	}
    }
    
    func ansiSaveAttributes() {
    	if runtime.GOOS == "windows" {
    		return
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Aug 04 23:10:08 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  2. internal/logger/console.go

    				fmt.Fprint(Output, logBanner)
    				tagPrinted = true
    			} else {
    				fmt.Fprint(Output, emptyBanner)
    			}
    			// Restore the text color of the error message
    			ansiRestoreAttributes()
    			ansiMoveRight(bannerWidth)
    			// Continue  error message printing
    			fmt.Fprintln(Output, line)
    			break
    		}
    	}
    
    	// Exit because this is a fatal error message
    	ExitFunc(1)
    }
    
    type infoMsg struct{}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.8K bytes
    - Viewed (0)
Back to top